G'day all.

Aditya Siram wrote:

> > Prelude> sin pi
> > 1.22460635382238e-16  --WRONG!

Quoting Scott Turner <[EMAIL PROTECTED]>:

> 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
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to