Suppose your goal is to calculate (not look up) a value of pi that is accurate to n decimal places. Suppose n were 10. How would you do it?
![]() |
Suppose your goal is to calculate (not look up) a value of pi that is accurate to n decimal places. Suppose n were 10. How would you do it?
In Excel enter the formula:
=PI()
widen the column
then click on the icon to increase decimal (Formatting)
Is this what you're after?
Thank you, but no, that's not what I was after.
Using the Excel built-in function is sort of similar to a table lookup.
What did we do before Excel to CALCULATE, not look up, the value of pi?
I suspect the answer is to use a Taylor's series expansion of some mathematical function. Is that what would have been done?
It is a good idea... I guess you could ask the same question for number "e" (base of natural logarithm). You could take a function e^x, get it's Taylor's series expansion and calculate it's value for x=1. Now you only have to take some function whose value in a certain point is PI... call that point x_pi, get that function's Taylor's series expansion, and calculate it's value in x_pi.
PI = 4* SUM(from n=0 to infinity, (-1)^n/(2n+1)
As a pattern: 4* (1 - 1/3 + 1/5 - 1/7 + 1/9)
This is the easiest formula, but converges slowly
This post is over 6 years old. But.. a faster way to converge toward the value of pi is to use this seeries:
It converges to an accuracy of 10 digits in about 20 steps, whereas the formula Aleph posted would require tens of millions of steps.
All times are GMT -7. The time now is 03:56 AM. |