From 97eb3923d01211622a8be3b60f1afe4dfd217901 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 15 Jun 2004 21:00:00 +0000 Subject: [PATCH] 0.8.11.12: 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 | 5 ++++- version.lisp-expr | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/code/irrat.lisp b/src/code/irrat.lisp index e7131b0..b821b7a 100644 --- a/src/code/irrat.lisp +++ b/src/code/irrat.lisp @@ -118,7 +118,10 @@ #!+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 diff --git a/version.lisp-expr b/version.lisp-expr index 2b07b2f..2673bee 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".) -"0.8.11.11" +"0.8.11.12" -- 1.7.10.4