]> git.eshelyaron.com Git - emacs.git/commitdiff
(math-add-bignum): Replace number by constant.
authorJay Belanger <jay.p.belanger@gmail.com>
Fri, 6 Jul 2007 03:58:00 +0000 (03:58 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Fri, 6 Jul 2007 03:58:00 +0000 (03:58 +0000)
lisp/ChangeLog
lisp/calc/calc.el

index 8ed55f6a515eb679803dc49201045f61fa490842..047be6d9e9eb8139f8132a094ea243e61eac7863 100644 (file)
@@ -12,6 +12,8 @@
        instead of their values.
        (math-clip): Use math-small-integer-size instead of its value.
 
+       * calc/calc.el (math-add-bignum): Replace number by constant.
+
 2007-07-05  Chong Yidong  <cyd@stupidchicken.com>
 
        * wid-edit.el (widget-documentation-string-value-create): Insert
index 78d6231cb158ca28274b6525d7a9b1a4f45829b4..d81c1070b9f3fc19a7d522030b6e31d2dbbca38e 100644 (file)
@@ -2780,7 +2780,7 @@ largest Emacs integer.")
                      (progn
                        (setcar aa (1+ sum))
                        (setq carry nil))
-                   (setcar aa (+ sum -999)))
+                   (setcar aa (- sum (1- math-bignum-digit-size))))
                (if (< (setq sum (+ (car aa) (car b))) math-bignum-digit-size)
                    (setcar aa sum)
                  (setcar aa (- sum math-bignum-digit-size))
@@ -2790,7 +2790,7 @@ largest Emacs integer.")
            (if carry
                (if b
                    (nconc a (math-add-bignum b '(1)))
-                 (while (eq (car aa) 999)
+                 (while (eq (car aa) (1- math-bignum-digit-size))
                    (setcar aa 0)
                    (setq aa (cdr aa)))
                  (if aa