[Haskell-cafe] pi

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Tue Oct 9 19:59:49 EDT 2007


Dan Piponi writes: 

> jerzy.karczmarczuk wrote:
>> So, you assume that acos should have a *default* implementation in the
>> Floating class? Propose it, please.
> 
> I don't think the proposal makes any such assumption. It implies only
> that *if* you provide acos, pi will be provided for you automatically
> if you want.

Yes, sorry, I slipped... I was so against the acos(-1) /or atan(...)/
solution, that I wrote anything... 

>> 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...
> 
> pi is a transcendental number, same argument applies.

No. There is a difference between one constant which can be represented
with the maximum precision possible, and a procedure which necessarily
uses some approximations, and whose local precision for some argument will
be typically much lower than the machine one. 

Jerzy Karczmarczuk 




More information about the Haskell-Cafe mailing list