]> git.eshelyaron.com Git - emacs.git/commitdiff
(math-bignum-logb-digit-size,math-bignum-digit-power-of-two): Evaluate
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 8 Jul 2007 00:18:06 +0000 (00:18 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 8 Jul 2007 00:18:06 +0000 (00:18 +0000)
when compiled.

lisp/ChangeLog
lisp/calc/calc-bin.el

index aa6f87d2088330f14bbda8c0ee0bf417c910d5b4..ebce356719f0a8a54663173019bb86cfa358be61 100644 (file)
@@ -3,6 +3,9 @@
        * calc/calc.el (math-read-number-simple): Remove leading 0s.
        (math-bignum-digit-length): Change to optimal value.
 
+       * calc/calc-bin.el (math-bignum-logb-digit-size)
+       (math-bignum-digit-power-of-two): Evaluate when compiled.
+
        * calc/calc-comb.el (math-small-factorial-table)
        (math-init-random-base,math-prime-test): Remove unnecessary calls
        to `math-read-number-simple'.
index 8f3c9468d8855111fe14bb5d3d5e6a8a390d9463..fa8ba118c8cfe368fb0c9dbd761e53792a384879 100644 (file)
 
 ;;; Some useful numbers
 (defconst math-bignum-logb-digit-size
-  (logb math-bignum-digit-size)
+  (eval-when-compile (logb math-bignum-digit-size))
   "The logb of the size of a bignum digit.
 This is the largest value of B such that 2^B is less than 
 the size of a Calc bignum digit.")
 
 (defconst math-bignum-digit-power-of-two
-  (expt 2 math-bignum-logb-digit-size)
+  (eval-when-compile (expt 2 math-bignum-logb-digit-size))
   "The largest power of 2 less than the size of a Calc bignum digit.")
 
 ;;; b-prefix binary commands.