[ieeefp-tests-cvs] CVS update: ieeefp-tests/ieeefp-tests.lisp

Raymond Toy rtoy at common-lisp.net
Tue Jun 15 22:51:19 UTC 2004


Update of /project/ieeefp-tests/cvsroot/ieeefp-tests
In directory common-lisp.net:/tmp/cvs-serv22606

Modified Files:
	ieeefp-tests.lisp 
Log Message:
Add more constants.

Date: Tue Jun 15 15:51:19 2004
Author: rtoy

Index: ieeefp-tests/ieeefp-tests.lisp
diff -u ieeefp-tests/ieeefp-tests.lisp:1.6 ieeefp-tests/ieeefp-tests.lisp:1.7
--- ieeefp-tests/ieeefp-tests.lisp:1.6	Tue Jun 15 15:23:29 2004
+++ ieeefp-tests/ieeefp-tests.lisp	Tue Jun 15 15:51:19 2004
@@ -62,6 +62,9 @@
 	  ((atan2) 'atan)
 	  (t (fun-name vector)))))
 
+;; FIXME.  This needs to be macroized or something so that each
+;; constant is automatically added to *special-values*
+
 (eval-when (:compile-toplevel :load-toplevel :execute)
   ;; A bunch of constants for common IEEE values so we can read the
   ;; tests more easily.
@@ -69,7 +72,11 @@
     #X7FF8000000000000)
   (defconstant +quiet-single-float-nan-mask+
     #X7FC00000)
-  (defconstant +trapping-double-float-nan+
+  ;; NaN is supposed to ignore the sign, but the tests use both
+  ;; positive and negative NaNs, so define them here.
+  (defconstant +trapping-positive-double-float-nan+
+    #x7FF0000000000001)
+  (defconstant +trapping-negative-double-float-nan+
     #xFFF0000000000001)
   (defconstant +single-float-positive-infinity+
     #x7F800000)
@@ -83,6 +90,22 @@
     #X7FEFFFFFFFFFFFFF)
   (defconstant +most-positive-single-float+
     #x7F7FFFFF)
+  (defconstant +least-positive-double-float+
+    1)
+  (defconstant +least-positive-single-float+
+    1)
+  (defconstant +least-negative-double-float+
+    #x8000000000000001)
+  (defconstant +least-positive-single-float+
+    #x80000001)
+  (defconstant +least-positive-normalized-double-float+
+    #x10000000000000)
+  (defconstant +least-positive-normalized-single-float+
+    #x800000)
+  (defconstant +least-negative-normalized-double-float+
+    #x8010000000000000)
+  (defconstant +least-negative-normalized-single-float+
+    #x80800000)
   (defconstant +1d0+
     #x3FF0000000000000)
   (defconstant +1f0+
@@ -99,13 +122,22 @@
 	      `(,(symbol-value x) ,x))
 	  '(+quiet-double-float-nan-mask+
 	    +quiet-single-float-nan-mask+
-	    +trapping-double-float-nan+
+	    +trapping-positive-double-float-nan+
+	    +trapping-negative-double-float-nan+
 	    +single-float-positive-infinity+
 	    +single-float-negative-infinity+
 	    +double-float-positive-infinity+
 	    +double-float-negative-infinity+
 	    +most-positive-double-float+
 	    +most-positive-single-float+
+	    +least-positive-double-float+
+	    +least-positive-single-float+
+	    +least-negative-double-float+
+	    +least-negative-single-float+
+	    +least-positive-normalized-double-float+
+	    +least-positive-normalized-single-float+
+	    +least-negative-normalized-double-float+
+	    +least-negative-normalized-single-float+
 	    +1d0+
 	    +1f0+
 	    +negative-0d0+
@@ -397,6 +429,7 @@
   (with-open-file (s (format nil "/tmp/~(~A~)-~(~A~).lisp"
 			     fun-name precision)
 		     :direction :output :if-exists :supersede)
+    (format t "; Creating ~S~%" (file-namestring s))
     (format s "(in-package \"IEEEFP-TESTS\")~2%")
     (setf *test-counter* 0)
     (dolist (v (process-vector-file fun-name precision))
@@ -412,7 +445,7 @@
   (dolist (type *float-types*)
     (pushnew (make-one-test-file fun type) *test-files* :test #'equal)))
 
-(defvar *revision* "$Revision: 1.6 $")
+(defvar *revision* "$Revision: 1.7 $")
 
 (defun format-date (stream arg colonp atp)
   (declare (ignore colonp atp))





More information about the Ieeefp-tests-cvs mailing list