]> git.eshelyaron.com Git - emacs.git/commitdiff
(math-smallest-emacs-expt): Make the computation more robust.
authorJay Belanger <jay.p.belanger@gmail.com>
Mon, 1 Oct 2007 02:53:29 +0000 (02:53 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Mon, 1 Oct 2007 02:53:29 +0000 (02:53 +0000)
lisp/calc/calc-math.el

index 3e4743d58aea3af3a6477152c0a95fdc0a1d0891..0b4c82d12928b468624d9c4352d83fae3e01d085 100644 (file)
 (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))