Skip to content

Commit 9655816

Browse files
committed
Fix test for GHCJS
For some reason GHCJS gives worse precision. Why? It's mystery
1 parent 8b88cd6 commit 9655816

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/Tests/SpecFunctions.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ erfcTol = 4
3636
erfcLargeTol = 64
3737
#endif
3838

39+
isGHCJS :: Bool
40+
#if defined(__GHCJS__)
41+
isGHCJS = True
42+
#else
43+
isGHCJS = False
44+
#endif
45+
3946
tests :: TestTree
4047
tests = testGroup "Special functions"
4148
[ testGroup "erf"
@@ -81,6 +88,7 @@ tests = testGroup "Special functions"
8188
[ testCase "incompleteGamma table" $
8289
forTable "tests/tables/igamma.dat" $ \[a,x,exact] -> do
8390
let err | a < 10 = 16
91+
| a <= 101 = if isGHCJS then 64 else 32
8492
| a == 201 = 200
8593
| otherwise = 32
8694
checkTabularPure err (show (a,x)) exact (incompleteGamma a x)

0 commit comments

Comments
 (0)