[Haskell-cafe] pi

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Tue Oct 9 18:29:17 EDT 2007


Jonathan Cast reacts to Don Stewart statement about PI: 

>> It's in the Floating class.
> 
> Yes.  But it doesn't have a default implementation.  That strikes me as
> odd, considering the mathematical and actual correctness of 
> 
> class Floating sigma where
>    pi = acos (-1)
>    ...

So, you assume that acos should have a *default* implementation in the
Floating class? Propose it, please.
Note, BTW that from the viewpoint of "actual" correctness, it would be
better to have PI as exact as possible, while acos, well, it is a trans-
cendental function, whose representations are usually approximate... 

Jerzy Karczmarczuk 




More information about the Haskell-Cafe mailing list