How to Calculate Pi without a Calculator?
Moderators: gmalivuk, Moderators General, Prelates
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
How to Calculate Pi without a Calculator?
How does one calculate Pi without an electronic device?
Re: How to Calculate Pi without a Calculator?
You choose one of the many methods described here.
Mighty Jalapeno: "See, Zohar agrees, and he's nice to people."
SecondTalon: "Still better looking than Jesus."
Not how I say my name
SecondTalon: "Still better looking than Jesus."
Not how I say my name
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
Zohar wrote:You choose one of the many methods described here.
I've seen that page before.
Which one is the simplest?
Re: How to Calculate Pi without a Calculator?
The one that's easiest for you to do? Manually calculating 22/7 gives you reasonable accuracy for most practical purposes, or I suppose you can start calculating sums and such.
Mighty Jalapeno: "See, Zohar agrees, and he's nice to people."
SecondTalon: "Still better looking than Jesus."
Not how I say my name
SecondTalon: "Still better looking than Jesus."
Not how I say my name

 Posts: 1129
 Joined: Thu Dec 10, 2009 6:21 pm UTC
 Location: Placerville, CA
 Contact:
Re: How to Calculate Pi without a Calculator?
1. Find a circle.
2. Measure its circumference.
3. Measure its diameter.
4. Divide the circumference by the diameter.
2. Measure its circumference.
3. Measure its diameter.
4. Divide the circumference by the diameter.
"'Legacy code' often differs from its suggested alternative by actually working and scaling."
 Bjarne Stroustrup
www.commodorejohn.com  in case you were wondering, which you probably weren't.
 Bjarne Stroustrup
www.commodorejohn.com  in case you were wondering, which you probably weren't.
 doogly
 Dr. The Juggernaut of Touching Himself
 Posts: 5463
 Joined: Mon Oct 23, 2006 2:31 am UTC
 Location: Lexington, MA
 Contact:
Re: How to Calculate Pi without a Calculator?
I like the buffon needle experimental method.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.
Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.
Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
Zohar wrote:The one that's easiest for you to do? Manually calculating 22/7 gives you reasonable accuracy for most practical purposes, or I suppose you can start calculating sums and such.
I need something more accurate. 22/7 results in a repeating decimal, I believe.
What do you mean when you say calculating sums?
Re: How to Calculate Pi without a Calculator?
You'll never be able to get perfect accuracy, and with most calculations you'll either end up with a repeating decimal, or just stop at some point.
What do you need this for?
What do you need this for?
Mighty Jalapeno: "See, Zohar agrees, and he's nice to people."
SecondTalon: "Still better looking than Jesus."
Not how I say my name
SecondTalon: "Still better looking than Jesus."
Not how I say my name
Re: How to Calculate Pi without a Calculator?
liberonscien wrote:I need something more accurate. 22/7 results in a repeating decimal, I believe.
What do you mean when you say calculating sums?
He means something like this: in the Wikipedia article linked before there are a lot of options, and this one has some more that may be usable. It may be worth it to look at digit extraction methods, as they can be made to require very little memory, which is probably very helpful if you want to calculate it by hand.
Why do you want this?
Re: How to Calculate Pi without a Calculator?
liberonscien wrote:Zohar wrote:You choose one of the many methods described here.
I've seen that page before.
Which one is the simplest?
liberonscien wrote:How does one calculate Pi without an electronic device?
Continued fractions are doable by hand and yield good approximations without being too hard. Also you don't really need many digits. Even NASA uses only 16 digits for the program that controls and stabilizes spacecraft during missions. And that includes some extra digits just to be on the safe side.
Please be gracious in judging my english. (I am not a native speaker/writer.)
http://decodedarfur.org/
http://decodedarfur.org/
Re: How to Calculate Pi without a Calculator?
lorb wrote:Also you don't really need many digits. Even NASA uses only 16 digits for the program that controls and stabilizes spacecraft during missions. And that includes some extra digits just to be on the safe side.
Somehow I doubt the OP is asking this for any practical purpose.
If you want "practical", just memorize the number of digits you need in advance. Ofcourse this answer sucks all the fun out the challenge, but you can't deny that it works.
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:If you want "practical", just memorize the number of digits you need in advance. Ofcourse this answer sucks all the fun out the challenge, but you can't deny that it works.
I suppose there's one of those triangle diagrams things with "Easy to perform" in one corner, "Converges quickly" in another corner, and "Fun to do" in a third corner.
Memorizing is easy, and provides a sufficiently good result, but is not fun.
Ramanujan's method converges very quickly, may be fun to do, but is probably not very easy manually.
The Leibniz formula is easy, probably more fun than Ramanujan's, but converges very slowly.
If the purpose is "I want to do something while I'm bored in class", I would probably go with the third option.
Mighty Jalapeno: "See, Zohar agrees, and he's nice to people."
SecondTalon: "Still better looking than Jesus."
Not how I say my name
SecondTalon: "Still better looking than Jesus."
Not how I say my name
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:lorb wrote:Also you don't really need many digits. Even NASA uses only 16 digits for the program that controls and stabilizes spacecraft during missions. And that includes some extra digits just to be on the safe side.
Somehow I doubt the OP is asking this for any practical purpose.
If you want "practical", just memorize the number of digits you need in advance. Ofcourse this answer sucks all the fun out the challenge, but you can't deny that it works.
You are correct.
I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
I am trying to learn some higher math.
I think it would be interesting to see how far I can get.
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
Zohar wrote:PsiCubed wrote:If you want "practical", just memorize the number of digits you need in advance. Ofcourse this answer sucks all the fun out the challenge, but you can't deny that it works.
I suppose there's one of those triangle diagrams things with "Easy to perform" in one corner, "Converges quickly" in another corner, and "Fun to do" in a third corner.
Memorizing is easy, and provides a sufficiently good result, but is not fun.
Ramanujan's method converges very quickly, may be fun to do, but is probably not very easy manually.
The Leibniz formula is easy, probably more fun than Ramanujan's, but converges very slowly.
If the purpose is "I want to do something while I'm bored in class", I would probably go with the third option.
Thank you.
Re: How to Calculate Pi without a Calculator?
Zohar wrote:[...]
The Leibniz formula is easy, probably more fun than Ramanujan's, but converges very slowly.
If the purpose is "I want to do something while I'm bored in class", I would probably go with the third option.
Totally agree that the Leibniz formula would be an easy and somewhat fun way to spend boring classes on, but it converges so slow there is practically no visible progress after about 3 or 4 digits, and even getting there can take really really long. (Hours to get 4 accurate digits assuming it takes between 1 and 10 seconds for each term you add to the total. Can't get past 10 digits even if you do it your whole life.)
Please be gracious in judging my english. (I am not a native speaker/writer.)
http://decodedarfur.org/
http://decodedarfur.org/
Re: How to Calculate Pi without a Calculator?
liberonscien wrote:I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
For that purpose, manually calculating pi is a terribly inefficient method.
If you must generate the digits on the fly (that is  you want to be surprised as you fetch them), there are nice pseudorandom algorithms which are easy to implement on paper. Otherwise, memorizing a bulk of digits (either from pi or a simple book of random numbers) would be the way to go.
Also, while the digits of pi are probably random in the long run, the first few dozen digits do exhibit curious patterns. So if you want to use pi as a random digit generator, it is better to start at some distant position (say, the 5892th digit) and memorize from there.
I am trying to learn some higher math.
I think it would be interesting to see how far I can get.
For these two, the formulas based on the Taylor series of arctg(x) seems like the best bet. They are simple enough to work by hand, yet converge fast enough for you to see actual progress (usually a digit or two per step).
Wikipedia has tons of these. Pick one, and start crunching
Oh, and stay away from the Leibniz formula. It converges so slowly, that it sucks all the fun from the process. Definitely not the way to go, if you're interested in "seeing how far I can get".
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:liberonscien wrote:I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
For that purpose, manually calculating pi is a terribly inefficient method.
If you must generate the digits on the fly (that is  you want to be surprised as you fetch them), there are nice pseudorandom algorithms which are easy to implement on paper. Otherwise, memorizing a bulk of digits (either from pi or a simple book of random numbers) would be the way to go.
Also, while the digits of pi are probably random in the long run, the first few dozen digits do exhibit curious patterns. So if you want to use pi as a random digit generator, it is better to start at some distant position (say, the 5892th digit) and memorize from there.I am trying to learn some higher math.
I think it would be interesting to see how far I can get.
For these two, the formulas based on the Taylor series of arctg(x) seems like the best bet. They are simple enough to work by hand, yet converge fast enough for you to see actual progress (usually a digit or two per step).
Wikipedia has tons of these. Pick one, and start crunching
Oh, and stay away from the Leibniz formula. It converges so slowly, that it sucks all the fun from the process. Definitely not the way to go, if you're interested in "seeing how far I can get".
What is "arctg(x)"?
Re: How to Calculate Pi without a Calculator?
lorb wrote:Zohar wrote:[...]
The Leibniz formula is easy, probably more fun than Ramanujan's, but converges very slowly.
If the purpose is "I want to do something while I'm bored in class", I would probably go with the third option.
Totally agree that the Leibniz formula would be an easy and somewhat fun way to spend boring classes on, but it converges so slow there is practically no visible progress after about 3 or 4 digits, and even getting there can take really really long. (Hours to get 4 accurate digits assuming it takes between 1 and 10 seconds for each term you add to the total. Can't get past 10 digits even if you do it your whole life.)
Indeed: https://www.youtube.com/watch?v=HrRMnzANHHs
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
liberonscien wrote:PsiCubed wrote:liberonscien wrote:I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
For that purpose, manually calculating pi is a terribly inefficient method.
If you must generate the digits on the fly (that is  you want to be surprised as you fetch them), there are nice pseudorandom algorithms which are easy to implement on paper. Otherwise, memorizing a bulk of digits (either from pi or a simple book of random numbers) would be the way to go.
Also, while the digits of pi are probably random in the long run, the first few dozen digits do exhibit curious patterns. So if you want to use pi as a random digit generator, it is better to start at some distant position (say, the 5892th digit) and memorize from there.I am trying to learn some higher math.
I think it would be interesting to see how far I can get.
For these two, the formulas based on the Taylor series of arctg(x) seems like the best bet. They are simple enough to work by hand, yet converge fast enough for you to see actual progress (usually a digit or two per step).
Wikipedia has tons of these. Pick one, and start crunching
Oh, and stay away from the Leibniz formula. It converges so slowly, that it sucks all the fun from the process. Definitely not the way to go, if you're interested in "seeing how far I can get".
What is "arctg(x)"?
I believe this wasn't seen.
 Xanthir
 My HERO!!!
 Posts: 5336
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: How to Calculate Pi without a Calculator?
They meant to say "arctan()". Which is a fun and simple Taylor series, being "arctan(x) = x  x^3/3 + x^5/5  x^7/7 + x^9/9  ...".
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
Xanthir wrote:They meant to say "arctan()". Which is a fun and simple Taylor series, being "arctan(x) = x  x^3/3 + x^5/5  x^7/7 + x^9/9  ...".
This is the order of operations, correct:? "arctan(x) = x  ((x^3)/3) + ((x^5)/5)  ((x^7)/7) + ((x^9)/9)  ...".
Re: How to Calculate Pi without a Calculator?
Yup.
Just stay away from x=1
Just stay away from x=1
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:Yup.
Just stay away from x=1
I am having difficulties determining the purpose of your emoticon.
Is it there because you are being sarcastic, or is it there because you are saying it is too difficult?
I am baffled.
Edit:
Is it there because x=1 in this equation is basically pointless?
Re: How to Calculate Pi without a Calculator?
x=1 gives you the Leibniz Formula:
arctan(1) = 11/3+1/51/7... = pi/4
And I've already given my opinion about that one.
For x<1, the progress is much quicker because the series x,x^3,x^5,x^7 goes to zero fairly rapidly.
arctan(1) = 11/3+1/51/7... = pi/4
And I've already given my opinion about that one.
For x<1, the progress is much quicker because the series x,x^3,x^5,x^7 goes to zero fairly rapidly.
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:x=1 gives you the Leibniz Formula:
arctan(1) = 11/3+1/51/7... = pi/4
And I've already given my opinion about that one.
For x<1, the progress is much quicker because the series x,x^3,x^5,x^7 goes to zero fairly rapidly.
Ah. I was going to go in the X>1 direction, now I won't.
How does one do decimal or fractional exponents?
Re: How to Calculate Pi without a Calculator?
x>1 doesn't give you an answer at all, because the numbers just get bigger and bigger.
And exponents are simply repeated multiplication, which is just as easy to do with fractions:
(1/2)^3 = (1/2)*(1/2)*(1/2) = 1/8
And exponents are simply repeated multiplication, which is just as easy to do with fractions:
(1/2)^3 = (1/2)*(1/2)*(1/2) = 1/8
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:x>1 doesn't give you an answer at all, because the numbers just get bigger and bigger.
And exponents are simply repeated multiplication, which is just as easy to do with fractions:
(1/2)^3 = (1/2)*(1/2)*(1/2) = 1/8
Ah.
...
I misread something. I somehow confused ((x^3)/3) for ((3^x)/x). I was wondering how one would go about solving something like ((3^0.5)/0.5).
 gmalivuk
 GNU Terry Pratchett
 Posts: 26533
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: How to Calculate Pi without a Calculator?
liberonscien wrote:liberonscien wrote:PsiCubed wrote:liberonscien wrote:I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
For that purpose, manually calculating pi is a terribly inefficient method.
If you must generate the digits on the fly (that is  you want to be surprised as you fetch them), there are nice pseudorandom algorithms which are easy to implement on paper. Otherwise, memorizing a bulk of digits (either from pi or a simple book of random numbers) would be the way to go.
Also, while the digits of pi are probably random in the long run, the first few dozen digits do exhibit curious patterns. So if you want to use pi as a random digit generator, it is better to start at some distant position (say, the 5892th digit) and memorize from there.I am trying to learn some higher math.
I think it would be interesting to see how far I can get.
For these two, the formulas based on the Taylor series of arctg(x) seems like the best bet. They are simple enough to work by hand, yet converge fast enough for you to see actual progress (usually a digit or two per step).
Wikipedia has tons of these. Pick one, and start crunching
Oh, and stay away from the Leibniz formula. It converges so slowly, that it sucks all the fun from the process. Definitely not the way to go, if you're interested in "seeing how far I can get".
What is "arctg(x)"?
I believe this wasn't seen.
In the future, please wait more than 20 minutes before deciding people must not have seen the post you just made.
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
gmalivuk wrote:liberonscien wrote:liberonscien wrote:PsiCubed wrote:liberonscien wrote:I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
For that purpose, manually calculating pi is a terribly inefficient method.
If you must generate the digits on the fly (that is  you want to be surprised as you fetch them), there are nice pseudorandom algorithms which are easy to implement on paper. Otherwise, memorizing a bulk of digits (either from pi or a simple book of random numbers) would be the way to go.
Also, while the digits of pi are probably random in the long run, the first few dozen digits do exhibit curious patterns. So if you want to use pi as a random digit generator, it is better to start at some distant position (say, the 5892th digit) and memorize from there.I am trying to learn some higher math.
I think it would be interesting to see how far I can get.
For these two, the formulas based on the Taylor series of arctg(x) seems like the best bet. They are simple enough to work by hand, yet converge fast enough for you to see actual progress (usually a digit or two per step).
Wikipedia has tons of these. Pick one, and start crunching
Oh, and stay away from the Leibniz formula. It converges so slowly, that it sucks all the fun from the process. Definitely not the way to go, if you're interested in "seeing how far I can get".
What is "arctg(x)"?
I believe this wasn't seen.
In the future, please wait more than 20 minutes before deciding people must not have seen the post you just made.
Yes, sir.
Re: How to Calculate Pi without a Calculator?
liberonscien wrote:I was wondering how one would go about solving something like ((3^0.5)/0.5).
By using google or Wikipedia to learn about rational exponents.
Please be gracious in judging my english. (I am not a native speaker/writer.)
http://decodedarfur.org/
http://decodedarfur.org/
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:liberonscien wrote:I want to calculate Pi for three reasons.
I need a predictable number sequence with no patterns.
...
If you must generate the digits on the fly (that is  you want to be surprised as you fetch them), there are nice pseudorandom algorithms which are easy to implement on paper.
Building on this: linearfeedback shift registers are an excellent tool for this. They've got advanced mathematics behind them, they're easy to perform by hand (it's only addition), they have a long stream of (random numbers for any starting value (except 0) and you can make them for any base. (2 for coin flips, 6 for dice rolls, 10 for whatever you need decimal random numbers for) The only trouble is finding the primitive polynomials (for base 2 and 3 you can find them easily), though you can find them yourself for added 'fun'. You can also just use any base2 primitive and discard all values larger than your range when you draw a new set of bits.
Re: How to Calculate Pi without a Calculator?
By the way, there's a very simple way to estimate how close you are to pi with these sums:
If the signs alternate and the numbers get smaller and smaller, then the error is  at most  the last number you added.
So:
11/3+1/51/7 is within 1/7 of the correct value of pi/4
If the signs alternate and the numbers get smaller and smaller, then the error is  at most  the last number you added.
So:
11/3+1/51/7 is within 1/7 of the correct value of pi/4
 liberonscien
 ce
 Posts: 121
 Joined: Thu Jan 21, 2016 7:04 pm UTC
Re: How to Calculate Pi without a Calculator?
PsiCubed wrote:By the way, there's a very simple way to estimate how close you are to pi with these sums:
If the signs alternate and the numbers get smaller and smaller, then the error is  at most  the last number you added.
So:
11/3+1/51/7 is within 1/7 of the correct value of pi/4
Would one be correct if one said 1(1/3)+(1/5)(1/7) is the right order of operations?
If so, then would 1(1/3)+(1/5)(1/7)+(1/9)(1/11)+(1/13) be the proper extension?
Edit: Removed an extra "" symbol.
Last edited by liberonscien on Sun Aug 21, 2016 7:10 pm UTC, edited 1 time in total.
 gmalivuk
 GNU Terry Pratchett
 Posts: 26533
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: How to Calculate Pi without a Calculator?
But remember, that formula is extremely slow and if what you want are lots of digits, none of the ways for calculating pi by hand are going to get you very far.
Re: How to Calculate Pi without a Calculator?
A convenient way to calculate decimal digits of pi without a calculator is to use the Taylor series for arctangent with formula 24 on the Mathworld page of Machinlike formulas:
pi / 4 = 8 atan(1/10)  atan(1/239)  4 atan(1/515)
This formula is nice to work with for manual calculation because of the powers of 10 in the denominators the slowestconverging term. FWIW, I used it a decade or two ago to calculate 10 or so decimal places of pi (totally by hand, of course).
pi / 4 = 8 atan(1/10)  atan(1/239)  4 atan(1/515)
This formula is nice to work with for manual calculation because of the powers of 10 in the denominators the slowestconverging term. FWIW, I used it a decade or two ago to calculate 10 or so decimal places of pi (totally by hand, of course).
Re: How to Calculate Pi without a Calculator?
gmalivuk wrote:[...] none of the ways for calculating pi by hand are going to get you very far.
Depending on what you define as "very far". William Shanks did 707 digits by hand. (Though he made an arithmetic error and his digits are only correct for the first 527) Those 707 (or 527) I would consider pretty far, especially compared to how many digits any real world application requires. Even calculating the circumference of the visible universe, with an accuracy equal to the diameter of an hydrogen atom requires just 40 digits.
Today we have even better/faster converging formulas that are doable with about equal amount of work, so about a 1000 digits seems possible if you are pretty dedicated. (But yeah, not with the Leibniz Formula, no amount of dedication and lifelong calculation will get you beyond about 12 digits on that one)
Please be gracious in judging my english. (I am not a native speaker/writer.)
http://decodedarfur.org/
http://decodedarfur.org/
 gmalivuk
 GNU Terry Pratchett
 Posts: 26533
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: How to Calculate Pi without a Calculator?
If you want a source of "random" digits, 50 per year is not a very practical rate.
Re: How to Calculate Pi without a Calculator?
True! It's also next to nothing compared to how many digits of pi are already known.
Please be gracious in judging my english. (I am not a native speaker/writer.)
http://decodedarfur.org/
http://decodedarfur.org/
 flicky1991
 Like in Cinderella?
 Posts: 761
 Joined: Fri Feb 11, 2011 3:36 pm UTC
 Location: London
Re: How to Calculate Pi without a Calculator?
We got approximately 250 binary digits per year in your game. (I didn't even realise that was started by you when I went to find the link!)gmalivuk wrote:If you want a source of "random" digits, 50 per year is not a very practical rate.
any pronouns

Forum Games Discord
(tell me if link doesn't work)

avatar from phillip1882

Forum Games Discord
(tell me if link doesn't work)

avatar from phillip1882
Who is online
Users browsing this forum: No registered users and 10 guests