[commit: ghc] master: Add hyperbolic functions to test of Float-inverses (d814dd3)

git at git.haskell.org git at git.haskell.org
Sun May 6 01:45:09 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d814dd3862413bdfa5f44d3c67615cac3a0d4a41/ghc

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

commit d814dd3862413bdfa5f44d3c67615cac3a0d4a41
Author: Justus Sagemüller <sagemueller at geo.uni-koeln.de>
Date:   Wed Mar 28 14:44:51 2018 +0200

    Add hyperbolic functions to test of Float-inverses
    
    The area hyperbolic sine is currently broken,
    see https://ghc.haskell.org/trac/ghc/ticket/14927.


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

d814dd3862413bdfa5f44d3c67615cac3a0d4a41
 testsuite/tests/numeric/should_run/FloatFnInverses.hs     | 9 +++++++++
 testsuite/tests/numeric/should_run/FloatFnInverses.stdout | 6 ++++++
 testsuite/tests/numeric/should_run/all.T                  | 2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/numeric/should_run/FloatFnInverses.hs b/testsuite/tests/numeric/should_run/FloatFnInverses.hs
index 773790e..13bf873 100644
--- a/testsuite/tests/numeric/should_run/FloatFnInverses.hs
+++ b/testsuite/tests/numeric/should_run/FloatFnInverses.hs
@@ -20,6 +20,15 @@ main = mapM_ print
    -- @tan@ is invertible on @]-π/4…π/4[ <-> ]-∞…∞[@.
  , invDeviation @Double tan atan <$> [-0.7, -0.6 .. 0.7]
  , invDeviation @Float  tan atan <$> [-0.7, -0.6 .. 0.7]
+   -- @sinh@ is invertible on @ℝ <-> ℝ@, but grows very fast.
+ , invDeviation @Double sinh asinh <$> [-700, -672 .. 700]
+ , invDeviation @Float  sinh asinh <$> [-80, -71 .. 80]
+   -- @cosh@ is invertible on @[0…∞[ <-> [1…∞[@, but grows fast
+ , invDeviation @Double cosh acosh <$> [0, 15 .. 700]
+ , invDeviation @Float  cosh acosh <$> [0, 15 .. 80]
+   -- @tanh@ is invertible on @ℝ <-> ]-1…1[@.
+ , invDeviation @Double atanh tanh <$> [-0.99, -0.87 .. 0.9]
+ , invDeviation @Float  atanh tanh <$> [-0.99, -0.87 .. 0.9]
  ]
 
 invDeviation :: KnownNumDeviation a
diff --git a/testsuite/tests/numeric/should_run/FloatFnInverses.stdout b/testsuite/tests/numeric/should_run/FloatFnInverses.stdout
index 7fa3691..2d019b8 100644
--- a/testsuite/tests/numeric/should_run/FloatFnInverses.stdout
+++ b/testsuite/tests/numeric/should_run/FloatFnInverses.stdout
@@ -8,3 +8,9 @@
 [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
 [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
 [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
+[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
+[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
+[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
+[0.0,0.0,0.0,0.0,0.0,0.0]
+[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
+[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index 37fff44..9f2f52a 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -41,7 +41,7 @@ test('arith018', normal, compile_and_run, [''])
 test('arith019', normal, compile_and_run, [''])
 test('expfloat', normal, compile_and_run, [''])
 
-test('FloatFnInverses', normal, compile_and_run, [''])
+test('FloatFnInverses', expect_broken(14927), compile_and_run, [''])
 
 test('T1603', skip, compile_and_run, [''])
 test('T3676', expect_broken(3676), compile_and_run, [''])



More information about the ghc-commits mailing list