summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-math.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2007-10-01 02:53:29 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2007-10-01 02:53:29 +0000
commitf1640784ad5617487a3820e2c4f24c44193e1694 (patch)
tree2284605c26e09f5df43183fada96d9c004a8b21b /lisp/calc/calc-math.el
parentcf9e567f96a1e1a0d76e1a0de30a82f4a100e2b5 (diff)
downloademacs-f1640784ad5617487a3820e2c4f24c44193e1694.tar.gz
(math-smallest-emacs-expt): Make the computation more robust.
Diffstat (limited to 'lisp/calc/calc-math.el')
-rw-r--r--lisp/calc/calc-math.el4
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))