X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Farith.pure.lisp;h=3b1b86c5c9ac6c94a75f1826414fcb5d499749e2;hb=f21e0f5b908263715ea0d867edb64ceba5a3d668;hp=77291fffe54538f69ca25b9b9943888c5b0ba781;hpb=05abd44bb4a3699285dd499dbbb4c77b64304835;p=sbcl.git diff --git a/tests/arith.pure.lisp b/tests/arith.pure.lisp index 77291ff..3b1b86c 100644 --- a/tests/arith.pure.lisp +++ b/tests/arith.pure.lisp @@ -371,8 +371,12 @@ ;; GCD used to sometimes return negative values. The following did, on 32 bit ;; builds. (with-test (:name :gcd) + ;; from lp#413680 (assert (plusp (gcd 20286123923750474264166990598656 - 680564733841876926926749214863536422912)))) + 680564733841876926926749214863536422912))) + ;; from lp#516750 + (assert (plusp (gcd 2596102012663483082521318626691873 + 2596148429267413814265248164610048)))) (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) @@ -572,6 +576,8 @@ (test x2) (test (1+ x2)) (test (1- x2))))) + (test most-positive-fixnum) + (test (1+ most-positive-fixnum)) (loop for i from 1 to 200 for pow = (expt 2 (1- i)) for j = (+ pow (random pow)) @@ -580,3 +586,15 @@ (tests j)) (dotimes (i 10) (tests (random (expt 2 (+ 1000 (random 10000)))))))) + +;; bug 1026634 (reported by Eric Marsden on sbcl-devel) +(with-test (:name :recursive-cut-to-width) + (assert (eql (funcall + (compile nil + `(lambda (x) + (declare (optimize (space 3)) + (type (integer 12417236377505266230 + 12417274239874990070) x)) + (logand 8459622733968096971 x))) + 12417237222845306758) + 2612793697039849090)))