diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2007-10-01 02:53:29 +0000 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2007-10-01 02:53:29 +0000 |
commit | f1640784ad5617487a3820e2c4f24c44193e1694 (patch) | |
tree | 2284605c26e09f5df43183fada96d9c004a8b21b /lisp/calc/calc-math.el | |
parent | cf9e567f96a1e1a0d76e1a0de30a82f4a100e2b5 (diff) | |
download | emacs-f1640784ad5617487a3820e2c4f24c44193e1694.tar.gz emacs-f1640784ad5617487a3820e2c4f24c44193e1694.tar.bz2 emacs-f1640784ad5617487a3820e2c4f24c44193e1694.zip |
(math-smallest-emacs-expt): Make the computation more robust.
Diffstat (limited to 'lisp/calc/calc-math.el')
-rw-r--r-- | lisp/calc/calc-math.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 3e4743d58ae..0b4c82d1292 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -69,12 +69,12 @@ (defvar math-smallest-emacs-expt (let ((x -1)) (while (condition-case nil - (expt 10.0 x) + (> (expt 10.0 x) 0.0) (error nil)) (setq x (* 2 x))) (setq x (/ x 2)) (while (condition-case nil - (expt 10.0 x) + (> (expt 10.0 x) 0.0) (error nil)) (setq x (1- x))) (+ x 2)) |