• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How is the value of pi derived?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: Syringer
Originally posted by: b0mbrman
By measuring using bigger and bigger circles 🙂

Actually, one real way that I remember is 4 - 4/3 + 4/5 - 4/7 + 4/9...

That's cool. I just tried summing up 100 terms using that on my TI-89, and got 3.13159.

1000 terms gets me 3.14059. Anything bigger takes way too long..

FYI, 10000 terms gets you 3.14S1P5I9D2E6R535897932
 
Originally posted by: Syringer
Originally posted by: b0mbrman
By measuring using bigger and bigger circles 🙂

Actually, one real way that I remember is 4 - 4/3 + 4/5 - 4/7 + 4/9...

That's cool. I just tried summing up 100 terms using that on my TI-89, and got 3.13159.

1000 terms gets me 3.14059. Anything bigger takes way too long..
The simplification of the arctan series. It's actually exactly pi, when fully evaluated. Unfortunately, it is also terribly inefficient as far as a series is concerned.
 
an interesting "computer sciencie" way of approximating pi is to create a program to randomly generate points in a square of arbitrary length. you then inscribe a circle in that square and find out how many points are in or on that circle (just use the distance from the center of the square). pi should then approximate to:
pi = 4 * (points in circle) / (total points in square)

the more points your generate, the better the approximatio.
 
Originally posted by: dullard
Originally posted by: mygumballs
the more points your generate, the better the approximatio.
Interesting, please tell more. Do you have a link?

no, a friend of mine just told me about it. but a sort of proof is easy. the ratio of points in teh square to the points in the circle is the same as the ratio of the area of the circle to the area of the square. if the square's sides are x long, then its area is x^2 and the area of the circle is 1/4 pi x^2. therefore the ratio is 1/4 pi.

here's some pseudocode of the process:

int p = 0
for (int i = 0, i < n, i++)
{
x = (random number between 0 and 1 )
y = (random number between 0 and 1 )

if ( squareroot( x^2 + y^2 ) <= 1 )
p++
}
pi = 4 * (p / n)


you choose how big of n you want
 
Originally posted by: dullard
There are dozens and dozens of ways. Here is a fun method. It is quite powerful at calculating all types of things, but it is slow and inefficient.

Dang you for beating me to the Monte Carlo simulation method.

And to all the morons who didn't understand the OP... PWNED! It was pretty obvious the OP was asking how to compute "pi", not what it is. 😀
 
Originally posted by: mygumballs
no, a friend of mine just told me about it. but a sort of proof is easy. the ratio of points in teh square to the points in the circle is the same as the ratio of the area of the circle to the area of the square. if the square's sides are x long, then its area is x^2 and the area of the circle is 1/4 pi x^2. therefore the ratio is 1/4 pi.
Time to replace your sarcasm and repost meters. Both are malfunctioning today. I posted that exact solution already in this thread.

I lumped your repost reponse with Goosemaster's repost response for a reason.

 
Originally posted by: oboeguy
Originally posted by: dullard
There are dozens and dozens of ways. Here is a fun method. It is quite powerful at calculating all types of things, but it is slow and inefficient.

Dang you for beating me to the Monte Carlo simulation method.

And to all the morons who didn't understand the OP... PWNED! It was pretty obvious the OP was asking how to compute "pi", not what it is. 😀

oh teh nooeeeeeees! i didn't even know some one already posted that method already. now my posts are obsolete...🙁
 
Back
Top