Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2020-10-24 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (246 votes). Check out past polls.

    Notices?