diff options
| author | Jay Belanger | 2007-07-08 00:18:06 +0000 |
|---|---|---|
| committer | Jay Belanger | 2007-07-08 00:18:06 +0000 |
| commit | 4346200eb93682e0dda0149e71ea3ff462c0f397 (patch) | |
| tree | 63b989d3e0d82855b1e8353503a4f9b527fb4e3b | |
| parent | 9066adc420e321b5d21982b0c1edc092d26902f2 (diff) | |
| download | emacs-4346200eb93682e0dda0149e71ea3ff462c0f397.tar.gz emacs-4346200eb93682e0dda0149e71ea3ff462c0f397.zip | |
(math-bignum-logb-digit-size,math-bignum-digit-power-of-two): Evaluate
when compiled.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/calc/calc-bin.el | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa6f87d2088..ebce356719f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | * calc/calc.el (math-read-number-simple): Remove leading 0s. | 3 | * calc/calc.el (math-read-number-simple): Remove leading 0s. |
| 4 | (math-bignum-digit-length): Change to optimal value. | 4 | (math-bignum-digit-length): Change to optimal value. |
| 5 | 5 | ||
| 6 | * calc/calc-bin.el (math-bignum-logb-digit-size) | ||
| 7 | (math-bignum-digit-power-of-two): Evaluate when compiled. | ||
| 8 | |||
| 6 | * calc/calc-comb.el (math-small-factorial-table) | 9 | * calc/calc-comb.el (math-small-factorial-table) |
| 7 | (math-init-random-base,math-prime-test): Remove unnecessary calls | 10 | (math-init-random-base,math-prime-test): Remove unnecessary calls |
| 8 | to `math-read-number-simple'. | 11 | to `math-read-number-simple'. |
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index 8f3c9468d88..fa8ba118c8c 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el | |||
| @@ -34,13 +34,13 @@ | |||
| 34 | 34 | ||
| 35 | ;;; Some useful numbers | 35 | ;;; Some useful numbers |
| 36 | (defconst math-bignum-logb-digit-size | 36 | (defconst math-bignum-logb-digit-size |
| 37 | (logb math-bignum-digit-size) | 37 | (eval-when-compile (logb math-bignum-digit-size)) |
| 38 | "The logb of the size of a bignum digit. | 38 | "The logb of the size of a bignum digit. |
| 39 | This is the largest value of B such that 2^B is less than | 39 | This is the largest value of B such that 2^B is less than |
| 40 | the size of a Calc bignum digit.") | 40 | the size of a Calc bignum digit.") |
| 41 | 41 | ||
| 42 | (defconst math-bignum-digit-power-of-two | 42 | (defconst math-bignum-digit-power-of-two |
| 43 | (expt 2 math-bignum-logb-digit-size) | 43 | (eval-when-compile (expt 2 math-bignum-logb-digit-size)) |
| 44 | "The largest power of 2 less than the size of a Calc bignum digit.") | 44 | "The largest power of 2 less than the size of a Calc bignum digit.") |
| 45 | 45 | ||
| 46 | ;;; b-prefix binary commands. | 46 | ;;; b-prefix binary commands. |