how to generate pi in c

Chris Rees utisoft at gmail.com
Mon Nov 15 19:42:24 UTC 2010


On 11 November 2010 12:06, Wojciech Puchar <wojtek at tensor.gdynia.pl> wrote:
>
>> Does anyone has a "generate-pi.c" source code?
>
> atanl(1)

Er, arc tan of 1 is pi/4.

Try atanl(1)*4, or for a less wasteful instruction try using the constant M_PI

Also, forgive me if I'm wrong, but this looks like a homework question.

Chris


More information about the freebsd-questions mailing list