[commit: ghc] ghc-8.2: testsuite: Note x87 terribleness in num009 (6fe3f90)

git at git.haskell.org git at git.haskell.org
Mon Mar 27 02:59:45 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/6fe3f90a29aebc59f2aa7e5c9111ed1a4afaa127/ghc

>---------------------------------------------------------------

commit 6fe3f90a29aebc59f2aa7e5c9111ed1a4afaa127
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Mar 24 13:22:08 2017 -0400

    testsuite: Note x87 terribleness in num009
    
    (cherry picked from commit a1b7e866378e848d50b940595aa43fa63672cf37)


>---------------------------------------------------------------

6fe3f90a29aebc59f2aa7e5c9111ed1a4afaa127
 libraries/base/tests/Numeric/num009.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libraries/base/tests/Numeric/num009.hs b/libraries/base/tests/Numeric/num009.hs
index 429f0bf..c0dec43 100644
--- a/libraries/base/tests/Numeric/num009.hs
+++ b/libraries/base/tests/Numeric/num009.hs
@@ -1,4 +1,8 @@
 -- trac #2059
+--
+-- Note that this test fails miserably when compiled to use X87 floating point.
+-- For instance, in the case of (sin 1e20) the X86 FSIN instruction doesn't even
+-- get the sign right on my machine.
 
 module Main(main) where
 
@@ -20,7 +24,7 @@ test :: (RealFloat a, Floating a, RealFloat b, Floating b, Show b)
 test s f g x = do let y = realToFrac (f (realToFrac x))
                       z = g x
                   unless (y == z) $ do
-                      putStrLn (s ++ ' ':show x)
+                      putStrLn ("uh oh! " ++ s ++ ' ':show x)
                       print y
                       print z
                       print $ decodeFloat y



More information about the ghc-commits mailing list