by multithreaded code. See documentation for details.
* enhancement: Experimental support for threading on Linux/PPC.
* bug fix: RENAME-PACKAGE returns the package. (Thanks to Eric Marsden)
+ * bug fix: EXPT signals an error if first argument is a zero and second
+ argument is a floating point zero. (lp#571581, thanks to Roman Marynchak)
changes in sbcl-1.0.41 relative to sbcl-1.0.40:
* optimization: validity of observed keyword initargs to MAKE-INSTANCE is
"*SETF-FDEFINITION-HOOK*"
;; error-reporting facilities
+ "ARGUMENTS-OUT-OF-DOMAIN-ERROR"
"CLOSED-STREAM-ERROR"
"COMPILED-PROGRAM-ERROR"
"ENCAPSULATED-CONDITION"
(define-condition simple-reference-warning (reference-condition simple-warning)
())
+(define-condition arguments-out-of-domain-error
+ (arithmetic-error reference-condition)
+ ())
+
(define-condition duplicate-definition (reference-condition warning)
((name :initarg :name :reader duplicate-definition-name))
(:report (lambda (c s)
#!+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
(with-test (:name :gcd)
(assert (plusp (gcd 20286123923750474264166990598656
680564733841876926926749214863536422912))))
+
+(with-test (:name :expt-zero-zero)
+ ;; Check that (expt 0.0 0.0) and (expt 0 0.0) signal error, but (expt 0.0 0)
+ ;; returns 1.0
+ (assert (raises-error? (expt 0.0 0.0) sb-int:arguments-out-of-domain-error))
+ (assert (raises-error? (expt 0 0.0) sb-int:arguments-out-of-domain-error))
+ (assert (eql (expt 0.0 0) 1.0)))
;;; 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.41.46"
+"1.0.41.47"