My Math Forum Algorithm for PI

 Applied Math Applied Math Forum

 July 5th, 2013, 08:37 AM #1 Newbie   Joined: Jun 2013 Posts: 19 Thanks: 0 Algorithm for PI I hope this is the right place to post this. I'm just wondering why there are so many algorithm for the calculation of PI. If PI is simply the ratio of the circumference of a circle to its diameter, why are there so many algorithm to compute it? How do we know that the algorithm is appropriate to ensure the accuracy of the calculation for PI? Does a perfect circle even exist to verify the accuracy of the calculations? And also, if PI is irrational, how can the ratio be so FIXED? Thanks guys.
July 5th, 2013, 08:52 AM   #2
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Algorithm for PI

Quote:
 Originally Posted by Learner I'm just wondering why there are so many algorithm for the calculation of PI. If PI is simply the ratio of the circumference of a circle to its diameter, why are there so many algorithm to compute it?
Why not?

Probably there are lots of algorithms to compute lots of constants, and we've found many for pi because we're looking for them. There are surely many algorithms for computing constants we don't care so much about but haven't discovered for just that reason.

Quote:
 Originally Posted by Learner How do we know that the algorithm is appropriate to ensure the accuracy of the calculation for PI?
Each algorithm or formula needs to be proved independently, though there are some techniques like the W-Z method that sometimes allow a whole type of formula to be proved 'automatically'.

Quote:
 Originally Posted by Learner Does a perfect circle even exist to verify the accuracy of the calculations?
We don't need one! Even if we had one, it wouldn't do us any good since we can only measure with very limited accuracy.

Quote:
 Originally Posted by Learner And also, if PI is irrational, how can the ratio be so FIXED?
What's the problem? All numbers are fixed, rational and irrational.

Almost all numbers are irrational, so this quality doesn't make pi unusual in any way.

July 6th, 2013, 06:26 AM   #3
Senior Member

Joined: Jun 2013
From: London, England

Posts: 1,316
Thanks: 116

Re: Algorithm for PI

Quote:
 Originally Posted by Learner I hope this is the right place to post this. Does a perfect circle even exist to verify the accuracy of the calculations? Thanks guys.
Nothing in mathematics exists in the real world. A circle, like everything mathematical, is a an abstraction. Not least, as we are living in a non-Euclidean universe.

That said, you can research, for example how to estimate Pi by using Polygons of increasing number of sides and, by using some basic trigonometry, you can come up with two algorithms:

n*cos(90-180/n)/2

n/2*tan(90-180/n)

Where, as n increases, these numbers get closer to Pi.

Other algortithms tend to come from the fact that Pi crops up in other parts of mathematics.

 July 7th, 2013, 05:59 AM #4 Senior Member   Joined: Jun 2013 From: London, England Posts: 1,316 Thanks: 116 Re: Algorithm for PI ... knock the 2's out of those equations! I was also thinking that if you drew a perfect circle on the surface of the Earth and measured the (curved) diameter along the Earth's surface, then you wouldn't get a ratio of C = Pi * D. In the extreme case where the circle was a great circle, then the diameter would be half a great circle, so that C = 2 * D!
 July 9th, 2013, 08:39 AM #5 Newbie   Joined: Jun 2013 Posts: 19 Thanks: 0 Re: Algorithm for PI Hmmm, ok, maybe I should rephrase my question. Are most algorithms derived from the fact that PI is the ratio of the circumference of a circle to its diameter or is it derived from knowing what the first few digits of PI are and then generate the rest of the digits using some algorithm that can successfully generate the first few known digits? I'm asking this because as far as I know different algorithms can have different accuracy. If so, how then do we know which algorithm is absolutely accurate? How do we judge the accuracy of the algorithm? Are the trillions of digits generated in world records absolutely correct? How can we know? And on a ruler, is the value of PI exact? Or is it moving because we don't know the exact value of PI and with increasing number of digits we get more and more precise?
July 9th, 2013, 08:53 AM   #6
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Algorithm for PI

Quote:
 Originally Posted by Learner Are most algorithms derived from the fact that PI is the ratio of the circumference of a circle to its diameter
I don't know that any are.

Quote:
 Originally Posted by Learner is it derived from knowing what the first few digits of PI are and then generate the rest of the digits using some algorithm that can successfully generate the first few known digits?
There are successive approximation algorithms, sure. You give an approximation, they give you a better one. They can be analyzed in terms of how much better the approximation gets at each step.

Quote:
 Originally Posted by Learner I'm asking this because as far as I know different algorithms can have different accuracy.
I'm not sure what you mean. (That's not to say I disagree...!)

Quote:
 Originally Posted by Learner If so, how then do we know which algorithm is absolutely accurate?
They need to be proved. You can also check algorithms against each other, if you like, but the proof is the real way that we know.

Quote:
 Originally Posted by Learner How do we judge the accuracy of the algorithm? Are the trillions of digits generated in world records absolutely correct? How can we know?
There are techniques used to prove that the generated values are correct, but these are usually very complex! Sometimes they are used, but generally what's done is that if you want N digits of precision, you use a technique which should give you, say, N + 1000 digits of precision and then discard the last thousand. This isn't necessarily correct but it typically suffices. But what (very little) doubt there is only relates to the last few digits; the large bulk of the trillions and trillions are correct.

I did see the verification technique for one of the world-record runs and it was pretty awesome. As far as I know most don't go through that much trouble.

Quote:
 Originally Posted by Learner And on a ruler, is the value of PI exact?
I don't think this is a sensible question to ask. How could you measure it to know?

Quote:
 Originally Posted by Learner Or is it moving because we don't know the exact value of PI and with increasing number of digits we get more and more precise?
I don't think the universe cares how precisely we know pi.

July 9th, 2013, 09:44 AM   #7
Newbie

Joined: Jun 2013

Posts: 19
Thanks: 0

Re: Algorithm for PI

Quote:
 Originally Posted by Pero Other algortithms tend to come from the fact that Pi crops up in other parts of mathematics
Care to elaborate what you mean by other parts of mathematics? Is it still derived from the ratio?

July 9th, 2013, 09:49 AM   #8
Math Team

Joined: Mar 2012
From: India, West Bengal

Posts: 3,871
Thanks: 86

Math Focus: Number Theory
Re: Algorithm for PI

Quote:
 Originally Posted by Learner Care to elaborate what you mean by other parts of mathematics?
Take for example, $\zeta(2)= \frac{\pi^2}{6}$.

Quote:
 Originally Posted by Learner Is it still derived from the ratio?
Technically, yes, but in a rather complicated way.

July 9th, 2013, 09:54 AM   #9
Newbie

Joined: Jun 2013

Posts: 19
Thanks: 0

Re: Algorithm for PI

Quote:
 Originally Posted by Pero ... knock the 2's out of those equations! I was also thinking that if you drew a perfect circle on the surface of the Earth and measured the (curved) diameter along the Earth's surface, then you wouldn't get a ratio of C = Pi * D. In the extreme case where the circle was a great circle, then the diameter would be half a great circle, so that C = 2 * D!
Wow, how does that work? How does the ratio become 2 for a great circle? Does "great" mean big?

July 9th, 2013, 09:58 AM   #10
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Algorithm for PI

Quote:
 Originally Posted by Learner Does "great" mean big?
On the Earth, a great circle is something like the equator (but could be turned any way you please). All lines of longitude are great circles, but the only line of latitude that is a great circle is the equator. (The other ones are smaller.)

 Tags algorithm

### how mathematics formula discovered

Click on a term to search for related topics.
 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post Bogauss Number Theory 15 March 19th, 2012 08:54 AM Bogauss Number Theory 14 March 1st, 2012 03:23 PM scoracle Computer Science 7 June 27th, 2011 05:05 AM skainstein Number Theory 6 September 15th, 2009 04:39 PM mmx64 Algebra 0 July 1st, 2008 11:23 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top