[commit: ghc] master: testsuite: Note x87 terribleness in num009 (a1b7e86)
git at git.haskell.org
git at git.haskell.org
Sun Mar 26 22:10:48 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/a1b7e866378e848d50b940595aa43fa63672cf37/ghc
>---------------------------------------------------------------
commit a1b7e866378e848d50b940595aa43fa63672cf37
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Mar 24 13:22:08 2017 -0400
testsuite: Note x87 terribleness in num009
>---------------------------------------------------------------
a1b7e866378e848d50b940595aa43fa63672cf37
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