
29 Apr
2006
29 Apr
'06
1:36 p.m.
The Sine function in the prelude is not behaving as I expected. In the following Hugs session I tested sin on 0, 90,180 & 360 degrees. Prelude> sin 0 0.0 --correct Prelude> sin (pi/2) 1.0 --correct Prelude> sin pi 1.22460635382238e-16 --WRONG! Prelude> sin (2*pi) -2.44921270764475e-16 --WRONG! Is this normal behaviour? Or am I using the trig functions in an unexpected way? Thanks... Deech