Commit 4eb498d1 authored by rrt's avatar rrt
Browse files

[project @ 2001-08-31 16:06:46 by rrt]

Change this test to make it mathematically trivial, but keep the ccall
intact. This has two salutary effects:

1. We can expect to get the same result (sin 0.0 = 0.0) on all systems.

2. sin exists on Windows. erf doesn't. Hence the test now works on Windows.
parent 212fa536
......@@ -2,10 +2,10 @@ module Main (main) where
import IOExts ( unsafePerformIO )
po :: Double -> Double
po rd = 0.5 + 0.5 * erf ((rd / 1.04) / sqrt 2)
c :: Double -> Double
c x = sin x
where
erf :: Double -> Double
erf x = unsafePerformIO (_ccall_ erf x)
sin :: Double -> Double
sin x = unsafePerformIO (_ccall_ sin x)
main = putStr (shows (po 2.0) "\n")
main = putStr (shows (c 0.0) "\n")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment