summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-bin.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2020-12-06 23:35:09 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2020-12-06 23:43:53 +0100
commitc13b4fa61e7ae9ce5baa05496243f632f26bcd9a (patch)
treeb2e828fe6b4f8e531e7c9b374cad4ecbf06fc6a1 /lisp/calc/calc-bin.el
parentf13ae2bb955bfbf8946bf3c9eab8693c8af4287d (diff)
downloademacs-c13b4fa61e7ae9ce5baa05496243f632f26bcd9a.tar.gz
Remove Calc bignum remnants
* lisp/calc/calc-macs.el (Math-natnum-lessp): * lisp/calc/calc-ext.el (math-norm-bignum, math-compare-bignum): * lisp/calc/calc-math.el (math-zerop-bignum) (math-scale-bignum-digit-size): Remove. * lisp/calc/calc-bin.el (math-integer-log2, calcFunc-rot, math-clip): * lisp/calc/calc-comb.el (math-prime-test, calcFunc-prfac) (calcFunc-totient, calcFunc-moebius): * lisp/calc/calc-ext.el (math-gcd): * lisp/calc/calc-funcs.el (calcFunc-betaB): * lisp/calc/calc-math.el (math-nth-root-int-iter, calcFunc-ilog): Replace Math-natnum-lessp with <.
Diffstat (limited to 'lisp/calc/calc-bin.el')
-rw-r--r--lisp/calc/calc-bin.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el
index 60dd17e5ed2..e3b1013b9aa 100644
--- a/lisp/calc/calc-bin.el
+++ b/lisp/calc/calc-bin.el
@@ -224,13 +224,13 @@
(let ((i 0)
(p math-power-of-2-cache)
val)
- (while (and p (Math-natnum-lessp (setq val (car p)) n))
+ (while (and p (< (setq val (car p)) n))
(setq p (cdr p)
i (1+ i)))
(if p
(and (equal val n)
i)
- (while (Math-natnum-lessp
+ (while (<
(prog1
(setq val (math-mul val 2))
(setq math-power-of-2-cache (nconc math-power-of-2-cache
@@ -438,7 +438,7 @@
(if (Math-integer-negp a)
(setq a (math-clip a w)))
(cond ((or (Math-integer-negp n)
- (not (Math-natnum-lessp n w)))
+ (>= n w))
(calcFunc-rot a (math-mod n w) w))
(t
(math-add (calcFunc-lsh a (- n w) w)
@@ -455,7 +455,7 @@
(math-reject-arg a 'integerp))
((< (or w (setq w calc-word-size)) 0)
(setq a (math-clip a (- w)))
- (if (Math-natnum-lessp a (math-power-of-2 (- -1 w)))
+ (if (< a (math-power-of-2 (- -1 w)))
a
(math-sub a (math-power-of-2 (- w)))))
((math-zerop w)