
1 May
2006
1 May
'06
3:19 a.m.
G'day all. Aditya Siram wrote:
Prelude> sin pi 1.22460635382238e-16 --WRONG!
Quoting Scott Turner
This value, the computer's pi, differs from true pi by 0.000000000000000122...
Exercise for those doing numeric analysis 101: Explain why these two numbers are approximately the same. And if you found that one too easy, show how quickly following iteration converges to pi. iterate (\x -> x + sin x) 1 Cheers, Andrew Bromage