summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-alg.el
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
|
* Remove redundant #' before lambda in calc/*.elStefan Kangas2021-04-05
| | | | | | | * lisp/calc/calc-alg.el (math-defsimplify): * lisp/calc/calc-ext.el (math-defintegral, math-defintegral-2): * lisp/calc/calc-prog.el (math-do-arg-check): Remove redundant #' before lambda.
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Don't quote lambdas with 'function' in calc/*.elStefan Kangas2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/calc/calc-aent.el (calc-do-quick-calc) (calc-do-calc-eval, math-build-parse-table): * lisp/calc/calc-alg.el (math-polynomial-base): * lisp/calc/calc-alg.el (math-is-poly-rec): * lisp/calc/calc-arith.el (calcFunc-scf): * lisp/calc/calc-arith.el (math-ceiling, math-round): * lisp/calc/calc-arith.el (math-trunc-fancy, math-floor-fancy): * lisp/calc/calc-ext.el (calc-init-extensions, calc-reset) (calc-refresh-top, calc-z-prefix-help, calc-binary-op-fancy) (calc-unary-op-fancy): * lisp/calc/calc-forms.el (math-make-mod): * lisp/calc/calc-frac.el (calcFunc-frac): * lisp/calc/calc-funcs.el (calcFunc-euler): * lisp/calc/calc-help.el (calc-full-help): * lisp/calc/calc-lang.el (c, pascal, fortran, tex, latex, eqn) (yacas, maxima, giac, math, maple): * lisp/calc/calc-macs.el (calc-wrapper, calc-slow-wrapper): * lisp/calc/calc-map.el (calc-get-operator, calcFunc-mapeqr) (calcFunc-reducea, calcFunc-rreducea, calcFunc-reduced) (calcFunc-rreduced, calcFunc-outer): * lisp/calc/calc-misc.el (another-calc, calc-do-handle-whys): * lisp/calc/calc-mode.el (calc-save-modes): * lisp/calc/calc-mtx.el (math-col-matrix, math-mul-mat-vec): * lisp/calc/calc-poly.el (math-sort-terms, math-poly-div-list) (math-mul-list, math-sort-poly-base-list) (math-partial-fractions): * lisp/calc/calc-prog.el (calc-user-define-formula): * lisp/calc/calc-rewr.el (math-rewrite, math-compile-patterns) (math-compile-rewrites, math-parse-schedule) (math-rwcomp-pattern): * lisp/calc/calc-store.el (calc-var-name-map, calc-let) (calc-permanent-variable, calc-insert-variables): * lisp/calc/calc-stuff.el (calc-flush-caches, calcFunc-pclean) (calcFunc-pfrac): * lisp/calc/calc-units.el (math-build-units-table) (math-decompose-units): * lisp/calc/calc-vec.el (calcFunc-mrow, math-mat-col) (calcFunc-mcol, math-mat-less-col, math-mimic-ident): * lisp/calc/calc-yank.el (calc-edit): * lisp/calc/calc.el (calc-mode-var-list-restore-default-values) (calc-mode-var-list-restore-saved-values, calc-mode, calc-quit): * lisp/calc/calccomp.el (math-compose-expr) (math-compose-matrix, math-vector-to-string): Don't quote lambdas with 'function'.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Calc: add missing dynamic variable declarationsMattias EngdegÄrd2019-12-26
| | | | | | | | | | * lisp/calc/calc-alg.el (math-simplify-only, calc-simplify-mode) (math-expand-formulas, calc-poly-div-remainder) (math-living-dangerously, math-simplifying, calc-angle-mode) (calc-prefer-frac, math-poly-base-variable): Declare dynamic variables. * test/lisp/calc/calc-tests.el (calc-poly-div): Add test for at least one bug caused by missing declarations.
* Fix trig simplification crash (bug#33052)Mattias EngdegÄrd2019-07-10
| | | | | | | * lisp/calc/calc-alg.el (calcFunc-sec, calcFunc-csc, calcFunc-cot): Check that `math-known-sin' and `math-known-tan' succeeded before using their value in arithmetic. * test/lisp/calc/calc-tests.el (calc-test-trig): Add regression tests.
* * lisp/calc/calc.el: Take advantage of native bignums.Stefan Monnier2019-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant :group args. (calc-trail-mode): Use inhibit-read-only. (math-bignum-digit-length, math-bignum-digit-size) (math-small-integer-size): Delete constants. (math-normalize): Use native bignums. (math-bignum, math-bignum-big): Delete functions. (math-make-float): The mantissa can't be a calc bignum any more. (math-neg, math-scale-left, math-scale-right, math-scale-rounding) (math-add, math-sub, math-mul, math-idivmod, math-quotient) (math-format-number, math-read-number, math-read-number-simple): Don't bother handling calc bignums. (math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum) (math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit) (math-div-bignum, math-div-bignum-digit, math-div-bignum-big) (math-div-bignum-part, math-div-bignum-try, math-format-bignum) (math-format-bignum-decimal, math-read-bignum): Delete functions. (math-numdigs): Don't presume that native ints are small enough to use a slow algorithm. * lisp/calc/calc-aent.el (calc-do-quick-calc): * lisp/calc/calc-vec.el (calcFunc-vunpack): * lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums. * lisp/calc/calc-bin.el (math-bignum-logb-digit-size) (math-bignum-digit-power-of-two): Remove constants. (calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor) (calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement): Use Emacs's builtin bignums. (math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum) (math-not-bignum, math-clip-bignum) (math-format-bignum-radix, math-format-bignum-binary) (math-format-bignum-octal, math-format-bignum-hex): Delete functions. (math-format-binary): Fix old copy&paste error. * lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg. (math-prime-test): math-fixnum is now the identity. * lisp/calc/calc-ext.el: Require cl-lib. (math-oddp): Use cl-oddp. Don't bother with calc bignums. (math-integerp, math-natnump, math-ratp, math-realp, math-anglep) (math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp) (math-num-natnump, math-objectp, math-check-integer, math-compare): Don't bother handling calc bignums. (math-check-fixnum): Use fixnump. (math-fixnum, math-fixnum-big, math-bignum-test): Remove functions. (math--format-integer-fancy): Rename from math-format-bignum-fancy. Adjust for internal bignums. * lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt. * lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp) (Math-integer-posp, Math-negp, Math-posp, Math-integerp) (Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp) (Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp) (Math-integer-neg, Math-primp, Math-num-integerp): Don't bother handling calc bignums. (Math-bignum-test): Delete function. * lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`. (math-isqrt, math-sqrt): Use cl-isqrt. Don't bother handling calc bignums. (math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small): Delete function. * lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump. (math-evenp): Use cl-evenp. (math-zerop, math-negp, math-posp, math-div2): Don't bother handling calc bignums. (math-div2-bignum): Delete function.
* Merge from origin/emacs-26Paul Eggert2018-12-31
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-01
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | * lisp/calc/calc-alg.el: Use lexical-binding and silence warningsStefan Monnier2018-11-20
|/ | | | | | | | | | | | | | | | | | | | | | | * lisp/calc/calc-alg.el: Use lexical-binding and silence warnings. (math-defsimplify): Let-bind 'expr' instead of math-simplify-expr. Adjust all users. (math-simplify-expr): Don't declare any more. (math--simplify-divide-expr): New dynbound var. (math-simplify-divide): Bind it when needed. (math-simplify-divisor): Use it instead of math-simplify-expr. (math-simplify-divisor): Only bind math-simplify-divisor-[nd]over around the calls to math-simplify-one-divisor. (math-expr-subst, math-is-polynomial): Don't use dynbound vars as formal arguments. (math-polynomial-base): Move binding of math-poly-base-pred. Don't bind math-poly-base-top-expr any more... * lisp/calc/calc-poly.el (math-total-polynomial-base): Bind it here instead! * lisp/calc/calc-units.el: Use lexical-binding and silence warnings. Adjust to the new 'expr' name in math-defsimplify. (math-find-base-units, math-to-standard-units, math-convert-units): Don't use dynbound vars as formal arguments. (math-simplify-expr): Don't declare any more.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Use the expression angle units while simplifying itTino Calancha2017-05-18
| | | | | | | | | | | | | Don't use the angle mode, use the angle units included in the expression instead (Bug#23889). * lisp/calc/calc-alg.el (calc-input-angle-units): New defun. (math-simplify): Use it. * lisp/calc/calc-forms.el (math-to-hms, math-from-hms): Don't use calc-angle-mode if math-simplifying-units is non-nil. * lisp/calc/calc-math.el (calcFunc-nroot, math-from-radians) (math-to-radians-2, math-from-radians-2): Don't convert angle to radians if math-simplifying-units is non-nil. * test/lisp/calc/calc-tests.el (test-calc-23889): Add test.
* Update copyright year to 2017Paul Eggert2016-12-31
| | | | Run admin/update-copyright.
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* Change maintainer address.Jay Belanger2015-11-03
| | | | * lisp/calc/calc (calc-bug-address): Change address.
* Update copyright year to 2015Paul Eggert2015-01-01
| | | | Run admin/update-copyright.
* * src/fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.Dmitry Antipov2014-06-26
| | | | | | * lisp/calc/calc-alg.el (math-beforep): * lisp/progmodes/cc-guess.el (c-guess-view-reorder-offsets-alist-in-style): Simplify because string-lessp can accept symbols as args.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-01
|
* Update copyright notices for 2013.Paul Eggert2013-01-01
|
* calc/calc.el (math-normalize-error): New variable.Jay Belanger2012-07-29
| | | | | | | (math-normalize): Set `math-normalize-error' to t when there's an error. calc/calc-alg.el (math-simplify): Don't simplify when `math-normalize' returns an error.
* calc-alg.el (math-simplify-divide): Don't cross multiply Jay Belanger2012-07-24
| | | | in an equation when the lhs is a variable.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-05
|
* Spelling fixes.Paul Eggert2011-12-21
|
* Don't quote lambda expressions with `quote'.Stefan Monnier2011-05-23
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-24
|
* Nuke arch-tags.Glenn Morris2011-01-15
|
* Merge from emacs-23Stefan Monnier2011-01-14
|\
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-02
| |
* | calc-alg.el (math-var): Renamed from `var'.Jay Belanger2010-10-13
|/ | | | | | | (math-is-polynomial, math-is-poly-rec): Replace `var' with `math-var'. calcalg2.el (math-var): Renamed from `var'. (calcFunc-table, math-scan-for-limits): Replace `var' with `math-var'.
* Add 2010 to copyright years.Glenn Morris2010-01-13
|
* (var): Define for compiler.Glenn Morris2009-09-19
| | | | Delete trailing whitespace.
* (math-trig-rewrite, math-hyperbolic-trig-rewrite): New functions.Jay Belanger2009-08-24
| | | | (calc-simplify): Simplify trig functions when asked.
* Add 2009 to copyright years.Glenn Morris2009-01-05
|
* (calcFunc-collect): Normalize the coefficients of theJay Belanger2008-11-26
| | | | polynomial rather than the whole polynomial.
* (calcFunc-collect): Return constant polynomial when appropriate.Jay Belanger2008-11-03
|
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-06
|
* Fix up comment convention on the arch-tag lines.Stefan Monnier2008-04-10
|
* Add 2008 to copyright years.Glenn Morris2008-01-07
|
* Switch license to GPLv3 or later.Glenn Morris2007-07-25
|
* Update maintainer's address.Jay Belanger2007-04-23
|
* Change form of license text to match rest of Emacs.Glenn Morris2007-03-19
|
* Add 2007 to copyright years.Glenn Morris2007-01-21
|
* Update copyright year.Jay Belanger2006-02-05
|
* (calcFunc-write-out-power): Rename calcFunc-powerexpand.Jay Belanger2005-11-14
| | | | | | (math-write-out-power): Rename math-powerexpand, have it handle negative exponents. (calc-writeoutpower): Rename calc-powerexpand.
* (calcFunc-writeoutpower, math-write-out-power, calc-writeoutpower):Jay Belanger2005-10-28
| | | | New functions.
* Update copyright information.Jay Belanger2005-07-14
|
* Update copyright year.Jay Belanger2005-05-07
|