Skip the float.pure.lisp/RANGE-REDUCTION test outside x86.
authorLutz Euler <lutz.euler@freenet.de>
Thu, 7 Jun 2012 12:23:11 +0000 (14:23 +0200)
committerLutz Euler <lutz.euler@freenet.de>
Thu, 7 Jun 2012 12:23:11 +0000 (14:23 +0200)
The test was and is meant only to be used on x86 as it tests for results
the x87 FPU computes, which can differ from those on other platforms.
It was accidentally enabled for all platforms with commit
4c81c652cdc32faefee1bccb84c3c9a7854e3edd.

Revert this by skipping the test on everything except x86. Augment
the test's name and improve its comment so that it hopefully won't be
enabled again everywhere so easily.

tests/float.pure.lisp

index 4f28680..62a54b0 100644 (file)
                                        (the (eql #c(1.0 2.0))
                                          x))))))))
 
-;; This was previously x86-only, with note:
-;;   The x86 port used not to reduce the arguments of transcendentals
-;;   correctly. On other platforms, we trust libm to DTRT.
-;; but it doesn't cost any real amount to just test them all
-(with-test (:name :range-reduction
-            :fails-on ':x86-64)
+;; The x86 port used not to reduce the arguments of transcendentals
+;; correctly.
+;; This test is valid only for x86: The x86 port uses the builtin x87
+;; FPU instructions to implement the trigonometric functions; other
+;; ports rely on the system's math library. These two differ in the
+;; precision of pi used for the range reduction and so yield results
+;; that can differ by arbitrarily large amounts for large inputs.
+;; The test expects the x87 results.
+(with-test (:name (:range-reduction :x87)
+            :skipped-on '(not :x86))
   (flet ((almost= (x y)
            (< (abs (- x y)) 1d-5)))
     (macrolet ((foo (op value)