[Haskell-cafe] Sinus in Haskell

Hans van Thiel hthiel.char at zonnet.nl
Fri Nov 9 14:08:34 EST 2007


Hello All,
Can anybody explain the results for 1.0, 2.0 and 3.0 times pi below?
GHCi yields the same results. I did search the Haskell report and my
text books, but to no avail. Thanks in advance,
Hans van Thiel

Hugs> sin (0.0 * pi)
0.0
Hugs> sin (0.5 * pi)
1.0
Hugs> sin (1.0 * pi)
1.22460635382238e-16
Hugs> sin (1.5 * pi)
-1.0
Hugs> sin (2.0 * pi)
-2.44921270764475e-16
Hugs> sin (2.5 * pi)
1.0
Hugs> sin (3.0 * pi)
3.67381906146713e-16
Hugs> 



More information about the Haskell-Cafe mailing list