1.0.1.26:
authorJuho Snellman <jsnell@iki.fi>
Mon, 15 Jan 2007 21:24:04 +0000 (21:24 +0000)
committerJuho Snellman <jsnell@iki.fi>
Mon, 15 Jan 2007 21:24:04 +0000 (21:24 +0000)
        Fix bug in the win32 ATANH implementation (patch by Pierre Mai)

NEWS
src/code/irrat.lisp
tests/arith.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index bc37748..36ce348 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ changes in sbcl-1.0.2 relative to sbcl-1.0.1:
   * bug fix: NIL can be used as a tagbody tag (thanks to Stephen Wilson)
   * bug fix: Win32 port can now handle foreign code unwinding Lisp
     stack frames from alien callbacks.
+  * bug fix: ATANH returned incorrect results on win32 (thanks to Pierre Mai)
 
 changes in sbcl-1.0.1 relative to sbcl-1.0:
   * new platform: FreeBSD/x86-64, including support for threading.
index 5477d6d..5f901c9 100644 (file)
@@ -95,7 +95,7 @@
     (log (+ number (sqrt (- (* number number) 1.0d0))) #.(exp 1.0d0)))
   (declaim (inline %atanh))
   (defun %atanh (number)
-    (let ((ratio (/ (1+ number) (1- number))))
+    (let ((ratio (/ (+ 1 number) (- 1 number))))
       ;; Were we effectively zero?
       (if (= ratio -1.0d0)
           0.0d0
index 1505a57..f98ba64 100644 (file)
         (let ((x (random (ash 1 i))))
           (test x (test-logcount x))
           (test (- x) (test-logcount (- x))))))))
+
+;; 1.0 had a broken ATANH on win32
+(with-test (:name :atanh)
+  (assert (= (atanh 0.9d0) 1.4722194895832204d0)))
+
index ae4989c..39aeae8 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.1.25"
+"1.0.1.26"