Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Re: Pi calculator

by Anonymous Monk
on Feb 17, 2001 at 01:12 UTC ( #58984=note: print w/replies, xml ) Need Help??

in reply to Re: Pi calculator
in thread Pi calculator

Thaigrrrr Maybe I did not quite understand you. Thats exactly how the algorithm is supposed to work. The circle has a radius of 1, so it's area is pi (A=pi*r**2) and the square has an area of 4 since each side is 2. So the propability of any coordinate landing in the circle becomes area of circle/area of square or pi/4 so we divide the number that landed in the circle by the number overal and multiply the result by 4. Is this what you meant?

Replies are listed 'Best First'.
Re: Re: Re: Pi calculator
by Fingo (Monk) on Feb 17, 2001 at 01:14 UTC
    Oops forgot to log in, above post was mine

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://58984]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2021-05-18 06:03 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (174 votes). Check out past polls.