At 07:05 +0100 1999/02/03, Friedhelm Wrensch wrote:
>I suggest the following change to "builtin.c", near line 1242:
>
>CAFFloat(primPiFloat,(Float)(4*atan(1))) /* Float pi primitive */
>
>Alternatively, one could define
>
> pi = 4 * atan(1)
>
>in the Prelude.
Or using pi = 2 * asin(1.0). Perhaps likelier to give an accurate value.
-- The thing is that compilers are sometimes poor at converting all
decimals, so recomputing the value of pi every time the program is started
gives better accuracy.
Hans Aberg
* Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
* Home Page: <http://www.matematik.su.se/~haberg/>
* AMS member listing: <http://www.ams.org/cml/>