summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric
diff options
context:
space:
mode:
authorJustus Sagemüller <sagemueller@geo.uni-koeln.de>2018-03-28 14:44:51 +0200
committerBen Gamari <ben@smart-cactus.org>2018-05-05 20:28:18 -0400
commitd814dd3862413bdfa5f44d3c67615cac3a0d4a41 (patch)
tree4d3963f2e899d5e0c6ea9bc966482499cf257b4a /testsuite/tests/numeric
parentbe580b424ffd1d8ffead78b38eae6262ef2930b4 (diff)
downloadhaskell-d814dd3862413bdfa5f44d3c67615cac3a0d4a41.tar.gz
Add hyperbolic functions to test of Float-inverses
The area hyperbolic sine is currently broken, see https://ghc.haskell.org/trac/ghc/ticket/14927.
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r--testsuite/tests/numeric/should_run/FloatFnInverses.hs9
-rw-r--r--testsuite/tests/numeric/should_run/FloatFnInverses.stdout6
-rw-r--r--testsuite/tests/numeric/should_run/all.T2
3 files changed, 16 insertions, 1 deletions
diff --git a/testsuite/tests/numeric/should_run/FloatFnInverses.hs b/testsuite/tests/numeric/should_run/FloatFnInverses.hs
index 773790e532..13bf873407 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 7fa36911bc..2d019b8434 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 37fff44bde..9f2f52a0fb 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, [''])