diff lisp/calc/calc-math.el @ 84993:3788dd19e020

(math-smallest-emacs-expt): Make the computation more robust.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 01 Oct 2007 02:53:29 +0000
parents 5d2017af3365
children 39018b7044de
line wrap: on
line diff
--- a/lisp/calc/calc-math.el	Mon Oct 01 00:14:23 2007 +0000
+++ b/lisp/calc/calc-math.el	Mon Oct 01 02:53:29 2007 +0000
@@ -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))