how to generate pi in c

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

On 11 November 2010 12:06, Wojciech Puchar <wojtek at> 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.


More information about the freebsd-questions mailing list