From: Jay Belanger Date: Mon, 1 Oct 2007 02:53:29 +0000 (+0000) Subject: (math-smallest-emacs-expt): Make the computation more robust. X-Git-Tag: emacs-pretest-23.0.90~10562 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1640784ad5617487a3820e2c4f24c44193e1694;p=emacs.git (math-smallest-emacs-expt): Make the computation more robust. --- 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))