X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ffloat.pure.lisp;h=5612a73fbcbb99ab070931236babd78825e7c247;hb=b83353d9f998e5c0e34604b5593df70c66d2c510;hp=62a54b09e54adf8ae749500a5cedbba33cbd7fc8;hpb=d7c9385e5a7b27d38884ebed9df6e9e5c3ac5cbf;p=sbcl.git diff --git a/tests/float.pure.lisp b/tests/float.pure.lisp index 62a54b0..5612a73 100644 --- a/tests/float.pure.lisp +++ b/tests/float.pure.lisp @@ -269,38 +269,6 @@ (the (eql #c(1.0 2.0)) x)))))))) -;; 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) - `(assert (almost= (,op (mod ,value (* 2 pi))) - (,op ,value))))) - (let ((big (* pi (expt 2d0 70))) - (mid (coerce most-positive-fixnum 'double-float)) - (odd (* pi most-positive-fixnum))) - (foo sin big) - (foo sin mid) - (foo sin odd) - (foo sin (/ odd 2d0)) - - (foo cos big) - (foo cos mid) - (foo cos odd) - (foo cos (/ odd 2d0)) - - (foo tan big) - (foo tan mid) - (foo tan odd))))) - ;; Leakage from the host could result in wrong values for truncation. (with-test (:name :truncate) (assert (plusp (sb-kernel:%unary-truncate/single-float (expt 2f0 33))))