From: Nikodemus S. <de...@us...> - 2010-08-16 12:53:57
|
Update of /cvsroot/sbcl/sbcl/tests In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12097/tests Modified Files: arith.pure.lisp Log Message: 1.0.41.47: (EXPT 0.0 0.0) and (EXPT 0 0.0) to signal an error https://bugs.launchpad.net/sbcl/+bug/571581 From patch by Roman Marynchack. Index: arith.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/arith.pure.lisp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- arith.pure.lisp 26 Apr 2010 21:07:07 -0000 1.34 +++ arith.pure.lisp 16 Aug 2010 12:53:43 -0000 1.35 @@ -365,3 +365,10 @@ (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))) |