Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Calculating pi to n decimal places (https://www.askmehelpdesk.com/showthread.php?t=12489)

  • Sep 7, 2005, 05:14 AM
    reinsuranc
    Calculating pi to n decimal places
    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?
  • Sep 7, 2005, 06:51 AM
    colbtech
    In Excel enter the formula:

    =PI()

    widen the column

    then click on the icon to increase decimal (Formatting)

    Is this what you're after?
  • Sep 14, 2005, 04:17 PM
    reinsuranc
    Lookup in Excel
    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?
  • Sep 14, 2005, 06:18 PM
    CroCivic91
    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.
  • Jan 15, 2012, 08:58 AM
    Alephomomom
    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
  • Jan 17, 2012, 06:57 AM
    ebaines
    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.