[Openmcl-devel] bug reading double-floats
Yannick Versley
yversley at gmx.de
Mon Mar 3 04:21:54 PST 2003
Hi,
there is a bug which causes doubles (as in 1.00000000001d0) to be read
with single precision. The enclosed patch fixes this.
Yannick
-------------- next part --------------
--- ccl/lib/numbers.lisp.~1.4.~ Wed Feb 5 19:11:34 2003
+++ ccl/lib/numbers.lisp Mon Mar 3 12:21:15 2003
@@ -112,7 +112,7 @@
(defun float-5-to-e (e)
(if (> e 22) ; shouldnt happen
- (expt 5.0 e)
+ (expt 5.0d0 e)
(svref float-powers-of-5 e)))
(defparameter a-short-float nil)
@@ -645,7 +645,7 @@
(setq float-powers-of-5 (make-array 23))
(let ((array float-powers-of-5))
(dotimes (i 23)
- (setf (svref array i) (float (expt 5 i)))))
+ (setf (svref array i) (float (expt 5 i) 0.0d0))))
(setq integer-powers-of-5 (make-array (+ 12 (floor 324 12))))
(let ((array integer-powers-of-5))
(dotimes (i 12)
More information about the Openmcl-devel
mailing list