aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJay Belanger2007-07-08 00:11:09 +0000
committerJay Belanger2007-07-08 00:11:09 +0000
commita6a0d3cbf5a9c767d747649c8811295218fbb596 (patch)
treebbfcb3f6487811c3b1491c6d1366ab071ca12184 /lisp
parent94c95a358a8d92a90d48bac59d0f581280d670f0 (diff)
downloademacs-a6a0d3cbf5a9c767d747649c8811295218fbb596.tar.gz
emacs-a6a0d3cbf5a9c767d747649c8811295218fbb596.zip
(math-bignum-digit-length): Evaluate when compiled.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calc/calc.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 48a1f915aad..d85ec55d175 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2284,7 +2284,8 @@ See calc-keypad for details."
2284 2284
2285 2285
2286(defconst math-bignum-digit-length 2286(defconst math-bignum-digit-length
2287 (truncate (/ (log10 (/ most-positive-fixnum 2)) 2)) 2287 (eval-when-compile
2288 (truncate (/ (log10 (/ most-positive-fixnum 2)) 2)))
2288 "The length of a \"digit\" in Calc bignums. 2289 "The length of a \"digit\" in Calc bignums.
2289If a big integer is of the form (bigpos N0 N1 ...), this is the 2290If a big integer is of the form (bigpos N0 N1 ...), this is the
2290length of the allowable Emacs integers N0, N1,... 2291length of the allowable Emacs integers N0, N1,...
@@ -3574,13 +3575,13 @@ and all digits are kept, regardless of Calc's current precision."
3574 '( "2x" * 190 191 ) 3575 '( "2x" * 190 191 )
3575 math-standard-opers)))) 3576 math-standard-opers))))
3576 3577
3578(defvar math-expr-opers (math-standard-ops))
3579
3577(defun math-standard-ops-p () 3580(defun math-standard-ops-p ()
3578 (let ((meo (caar math-expr-opers))) 3581 (let ((meo (caar math-expr-opers)))
3579 (and (stringp meo) 3582 (and (stringp meo)
3580 (string= meo "*")))) 3583 (string= meo "*"))))
3581 3584
3582(defvar math-expr-opers (math-standard-ops))
3583
3584(defun math-expr-ops () 3585(defun math-expr-ops ()
3585 (if (math-standard-ops-p) 3586 (if (math-standard-ops-p)
3586 (math-standard-ops) 3587 (math-standard-ops)