0.8.11.12:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 15 Jun 2004 21:00:00 +0000 (21:00 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 15 Jun 2004 21:00:00 +0000 (21:00 +0000)
Better EXPT behaviour
... or at least different EXPT behaviour.  Arrange to (attempt to)
return a floating point 1, rather than a NaN, when the
base is NaN and the exponent is zero.

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

index e7131b0..b821b7a 100644 (file)
   #!+sb-doc
   "Return BASE raised to the POWER."
   (if (zerop power)
-      (1+ (* base power))
+      (let ((result (1+ (* base power))))
+       (if (and (floatp result) (float-nan-p result))
+           (float 1 result)
+           result))
     (labels (;; determine if the double float is an integer.
             ;;  0 - not an integer
             ;;  1 - an odd int
index 2b07b2f..2673bee 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".)
-"0.8.11.11"
+"0.8.11.12"