how to generate pi in c

Joe Zeff joe at zeff.us
Sun Nov 7 20:28:54 UTC 2010


On 11/07/2010 12:08 PM, Wolfgang S. Rupprecht wrote:
>
> Klaus-Peter Schrage<kpschrage at gmx.de>  writes:
>> You are probably alle wrong - pi equals 3.125, see:
>> http://www.correctpi.com/
>
> Arrrg.  I don't believe that I actually tried to read that and follow
> his logic.  Now my brain hurts.  This needs a NSFB warning.
>

One question: does he ever explain why his value gets the wrong answers 
and the "traditional" one doesn't?

Back on the original topic, I suppose, if you want to be weird, you 
could try the method I did, about 25 years ago: use numeric integration 
to find the area under the function f(x) = sqrt( 1 - y^2 ) from 0 to 1 
then multiply by 4.  I did it in FORTRAN on a CP/M machine and it needed 
all night to come up with an answer to the limits of the machine's 
precision.


More information about the users mailing list