X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Firrat.lisp;h=b821b7ac469b609cb33c352c17d5832251b0eab2;hb=e8e3ccee2ad4acb6ee1774d91648b68254868483;hp=e7131b08af7d56715f8593754095e88d10f16fb9;hpb=7665c62819f24bac3445e7eb5bb3428f48ecb120;p=sbcl.git 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