0.8.3.39:
[sbcl.git] / tests / arith.pure.lisp
index 7493d4e..de583e5 100644 (file)
                   (= (funcall fn 2) x2)
                   (= (funcall fn 3) x3))
        (error "bad results for ~D" x)))))
+
+;;; Bugs reported by Paul Dietz:
+
+;;; (GCD 0 x) must return (abs x)
+(dolist (x (list -10 (* 3 most-negative-fixnum)))
+  (assert (= (gcd 0 x) (abs x))))
+;;; LCM returns a non-negative number
+(assert (= (lcm 4 -10) 20))