# HG changeset patch # User Jay Belanger # Date 1191207209 0 # Node ID 3788dd19e020b833d8224310244cfa998673c239 # Parent 5a1966aded2df9c0d5edfd6c338381c7e123897b (math-smallest-emacs-expt): Make the computation more robust. diff -r 5a1966aded2d -r 3788dd19e020 lisp/calc/calc-math.el --- 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))