0.7.12.11:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 30 Jan 2003 12:23:10 +0000 (12:23 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 30 Jan 2003 12:23:10 +0000 (12:23 +0000)
Fix another bug in LOG, this time for rationals not near 1
... use double-precision intermediate values
still no regression tests, sorry

src/code/irrat.lisp
version.lisp-expr

index b221854..bab7661 100644 (file)
                      (integer-length denominator))
                   (coerce (%log1p (coerce (- number 1) 'double-float))
                           'single-float)
-                  (coerce (- (log numerator) (log denominator))
-                             'single-float)))))
+                  (coerce (/ (- (log2 numerator) (log2 denominator))
+                             (log (exp 1.0d0) 2.0d0))
+                          'single-float)))))
        (((foreach single-float double-float))
         ;; Is (log -0) -infinity (libm.a) or -infinity + i*pi (Kahan)?
         ;; Since this doesn't seem to be an implementation issue
index 41c4969..413402d 100644 (file)
@@ -18,4 +18,4 @@
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.12.10"
+"0.7.12.11"