#!+sb-doc
"Return BASE raised to the POWER."
(if (zerop power)
- (let ((result (1+ (* base power))))
- (if (and (floatp result) (float-nan-p result))
- (float 1 result)
- result))
+ (if (and (zerop base) (floatp power))
+ (error 'arguments-out-of-domain-error
+ :operands (list base power)
+ :operation 'expt
+ :references (list '(:ansi-cl :function expt)))
+ (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