From f1640784ad5617487a3820e2c4f24c44193e1694 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 1 Oct 2007 02:53:29 +0000 Subject: (math-smallest-emacs-expt): Make the computation more robust. --- lisp/calc/calc-math.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/calc/calc-math.el') 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)) -- cgit v1.2.1