diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-06-25 23:05:11 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-06-25 23:05:11 -0400 |
commit | 1bc1672f77d15f5f2cda29ce8ce4806bbb6ff71a (patch) | |
tree | a3b7fd9f3128dfb94129dbc35c723603557953c4 /lisp/calc/calc-comb.el | |
parent | 9552ee4df7d2ceebb8728a61d00598aa981b580c (diff) | |
download | emacs-1bc1672f77d15f5f2cda29ce8ce4806bbb6ff71a.tar.gz emacs-1bc1672f77d15f5f2cda29ce8ce4806bbb6ff71a.tar.bz2 emacs-1bc1672f77d15f5f2cda29ce8ce4806bbb6ff71a.zip |
* lisp/calc/calc.el: Take advantage of native bignums.
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.
Diffstat (limited to 'lisp/calc/calc-comb.el')
-rw-r--r-- | lisp/calc/calc-comb.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 02779039610..5bede650dd3 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -211,8 +211,8 @@ (calc-invert-func) (calc-next-prime iters)) -(defun calc-prime-factors (iters) - (interactive "p") +(defun calc-prime-factors (&optional _iters) + (interactive) (calc-slow-wrapper (let ((res (calcFunc-prfac (calc-top-n 1)))) (if (not math-prime-factors-finished) @@ -806,7 +806,6 @@ ((Math-integer-negp n) '(nil)) ((Math-natnum-lessp n 8000000) - (setq n (math-fixnum n)) (let ((i -1) v) (while (and (> (% n (setq v (aref math-primes-table (setq i (1+ i))))) |