0.8.6.28:
[sbcl.git] / tests / float.pure.lisp
index 5195bbb..dfa417e 100644 (file)
   (loop for (exp res) in tests
         for real-res = (multiple-value-list (eval exp))
         do (assert (equal real-res res))))
+
+;;; bug 45b reported by PVE
+(dolist (type '(short single double long))
+  (dolist (sign '(positive negative))
+    (let* ((name (find-symbol (format nil "LEAST-~A-~A-FLOAT"
+                                      sign type)
+                              :cl))
+           (value (symbol-value name)))
+      (assert (zerop (/ value 2))))))
+
+;;; bug found by Paul Dietz: bad rounding on small floats
+(assert (= (fround least-positive-short-float least-positive-short-float) 1.0))