From 1b87bfbe482c555879d2a902e88f9d147ead394e Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Mon, 15 Jan 2007 21:24:04 +0000 Subject: [PATCH] 1.0.1.26: Fix bug in the win32 ATANH implementation (patch by Pierre Mai) --- NEWS | 1 + src/code/irrat.lisp | 2 +- tests/arith.pure.lisp | 5 +++++ version.lisp-expr | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index bc37748..36ce348 100644 --- 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. diff --git a/src/code/irrat.lisp b/src/code/irrat.lisp index 5477d6d..5f901c9 100644 --- a/src/code/irrat.lisp +++ b/src/code/irrat.lisp @@ -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 diff --git a/tests/arith.pure.lisp b/tests/arith.pure.lisp index 1505a57..f98ba64 100644 --- a/tests/arith.pure.lisp +++ b/tests/arith.pure.lisp @@ -290,3 +290,8 @@ (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))) + diff --git a/version.lisp-expr b/version.lisp-expr index ae4989c..39aeae8 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4