kb/data/en.wikipedia.org/wiki/Approximations_of_pi-4.md

22 KiB
Raw Blame History

title chunk source category tags date_saved instance
Approximations of pi 5/10 https://en.wikipedia.org/wiki/Approximations_of_pi reference science, encyclopedia 2026-05-05T16:19:48.727542+00:00 kb-cron

((x),(y) = {239, 132} is a solution to the Pell equation x2 2y2 = 1.) Formulae of this kind are known as Machin-like formulae. Machin's particular formula was used well into the computer era for calculating record numbers of digits of π, but more recently other similar formulae have been used as well. For instance, Shanks and his team used the following Machin-like formula in 1961 to compute the first 100,000 digits of π:

        π
        4
      
    
    =
    6
    arctan
    
    
      
        1
        8
      
    
    +
    2
    arctan
    
    
      
        1
        57
      
    
    +
    arctan
    
    
      
        1
        239
      
    
  

{\displaystyle {\frac {\pi }{4}}=6\arctan {\frac {1}{8}}+2\arctan {\frac {1}{57}}+\arctan {\frac {1}{239}}}

and they used another Machin-like formula,

        π
        4
      
    
    =
    12
    arctan
    
    
      
        1
        18
      
    
    +
    8
    arctan
    
    
      
        1
        57
      
    
    
    5
    arctan
    
    
      
        1
        239
      
    
  

{\displaystyle {\frac {\pi }{4}}=12\arctan {\frac {1}{18}}+8\arctan {\frac {1}{57}}-5\arctan {\frac {1}{239}}}

as a check. The record as of December 2002 by Yasumasa Kanada of Tokyo University stood at 1,241,100,000,000 digits. The following Machin-like formulae were used for this:

        π
        4
      
    
    =
    12
    arctan
    
    
      
        1
        49
      
    
    +
    32
    arctan
    
    
      
        1
        57
      
    
    
    5
    arctan
    
    
      
        1
        239
      
    
    +
    12
    arctan
    
    
      
        1
        110443
      
    
  

{\displaystyle {\frac {\pi }{4}}=12\arctan {\frac {1}{49}}+32\arctan {\frac {1}{57}}-5\arctan {\frac {1}{239}}+12\arctan {\frac {1}{110443}}}

K. Takano (1982).

        π
        4
      
    
    =
    44
    arctan
    
    
      
        1
        57
      
    
    +
    7
    arctan
    
    
      
        1
        239
      
    
    
    12
    arctan
    
    
      
        1
        682
      
    
    +
    24
    arctan
    
    
      
        1
        12943
      
    
  

{\displaystyle {\frac {\pi }{4}}=44\arctan {\frac {1}{57}}+7\arctan {\frac {1}{239}}-12\arctan {\frac {1}{682}}+24\arctan {\frac {1}{12943}}}

F. C. M. Størmer (1896).

=== Other classical formulae === Other formulae that have been used to compute estimates of π include: Liu Hui (see also Viète's formula):

            π
          
          
            
            ≈
            768
            
              
                2
                
                
                  
                    2
                    +
                    
                      
                        2
                        +
                        
                          
                            2
                            +
                            
                              
                                2
                                +
                                
                                  
                                    2
                                    +
                                    
                                      
                                        2
                                        +
                                        
                                          
                                            2
                                            +
                                            
                                              
                                                2
                                                +
                                                1
                                              
                                            
                                          
                                        
                                      
                                    
                                  
                                
                              
                            
                          
                        
                      
                    
                  
                
              
            
          
        
        
          
          
            
            ≈
            3.141590463236763.
          
        
      
    
  

{\displaystyle {\begin{aligned}\pi &\approx 768{\sqrt {2-{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+1}}}}}}}}}}}}}}}}}}\\&\approx 3.141590463236763.\end{aligned}}}

Madhava:

    π
    =
    
      
        12
      
    
    
      ∑
      
        k
        =
        0
      
      
        ∞
      
    
    
      
        
          (
          
          3
          
            )
            
              
              k
            
          
        
        
          2
          k
          +
          1
        
      
    
    =
    
      
        12
      
    
    
      ∑
      
        k
        =
        0
      
      
        ∞
      
    
    
      
        
          (
          
          
            
              1
              3
            
          
          
            )
            
              k
            
          
        
        
          2
          k
          +
          1
        
      
    
    =
    
      
        12
      
    
    
      (
      
        
          
            1
            
              1
              ⋅
              
                3
                
                  0
                
              
            
          
        
        
        
          
            1
            
              3
              ⋅
              
                3
                
                  1
                
              
            
          
        
        +
        
          
            1
            
              5
              ⋅
              
                3
                
                  2
                
              
            
          
        
        
        
          
            1
            
              7
              ⋅
              
                3
                
                  3
                
              
            
          
        
        +
        ⋯
      
      )
    
  

{\displaystyle \pi ={\sqrt {12}}\sum _{k=0}^{\infty }{\frac {(-3)^{-k}}{2k+1}}={\sqrt {12}}\sum _{k=0}^{\infty }{\frac {(-{\frac {1}{3}})^{k}}{2k+1}}={\sqrt {12}}\left({1 \over 1\cdot 3^{0}}-{1 \over 3\cdot 3^{1}}+{1 \over 5\cdot 3^{2}}-{1 \over 7\cdot 3^{3}}+\cdots \right)}

Newton / Euler Convergence Transformation:

            arctan
            
            x
          
          
            
            =
            
              
                x
                
                  1
                  +
                  
                    x
                    
                      2
                    
                  
                
              
            
            
              ∑
              
                k
                =
                0
              
              
                ∞
              
            
            
              
                
                  (
                  2
                  k
                  )
                  !
                  !
                  
                  
                    x
                    
                      2
                      k
                    
                  
                
                
                  (
                  2
                  k
                  +
                  1
                  )
                  !
                  !
                  
                  (
                  1
                  +
                  
                    x
                    
                      2
                    
                  
                  
                    )
                    
                      k
                    
                  
                
              
            
            =
            
              
                x
                
                  1
                  +
                  
                    x
                    
                      2
                    
                  
                
              
            
            +
            
              
                2
                3
              
            
            
              
                
                  x
                  
                    3
                  
                
                
                  (
                  1
                  +
                  
                    x
                    
                      2
                    
                  
                  
                    )
                    
                      2
                    
                  
                
              
            
            +
            
              
                
                  2
                  ⋅
                  4
                
                
                  3
                  ⋅
                  5
                
              
            
            
              
                
                  x
                  
                    5
                  
                
                
                  (
                  1
                  +
                  
                    x
                    
                      2
                    
                  
                  
                    )
                    
                      3
                    
                  
                
              
            
            +
            ⋯
          
        
        
          
            
              
                π
                2
              
            
          
          
            
            =
            
              ∑
              
                k
                =
                0
              
              
                ∞
              
            
            
              
                
                  k
                  !
                
                
                  (
                  2
                  k
                  +
                  1
                  )
                  !
                  !
                
              
            
            =
            
              ∑
              
                k
                =
                0
              
              
                ∞
              
            
            
              
                
                  
                    
                  
                  
                    
                      
                        2
                        
                          k
                        
                      
                      k
                      
                        !
                        
                          2
                        
                      
                    
                  
                
                
                  
                    
                  
                  
                    
                      (
                      2
                      k
                      +
                      1
                      )
                      !
                    
                  
                
              
            
            =
            1
            +
            
              
                1
                3
              
            
            
              (
              
                1
                +
                
                  
                    2
                    5
                  
                
                
                  (
                  
                    1
                    +
                    
                      
                        3
                        7
                      
                    
                    
                      (
                      
                        1
                        +
                        ⋯
                      
                      )
                    
                  
                  )
                
              
              )
            
          
        
      
    
  

{\displaystyle {\begin{aligned}\arctan x&={\frac {x}{1+x^{2}}}\sum _{k=0}^{\infty }{\frac {(2k)!!\,x^{2k}}{(2k+1)!!\,(1+x^{2})^{k}}}={\frac {x}{1+x^{2}}}+{\frac {2}{3}}{\frac {x^{3}}{(1+x^{2})^{2}}}+{\frac {2\cdot 4}{3\cdot 5}}{\frac {x^{5}}{(1+x^{2})^{3}}}+\cdots \\[10mu]{\frac {\pi }{2}}&=\sum _{k=0}^{\infty }{\frac {k!}{(2k+1)!!}}=\sum _{k=0}^{\infty }{\cfrac {2^{k}k!^{2}}{(2k+1)!}}=1+{\frac {1}{3}}\left(1+{\frac {2}{5}}\left(1+{\frac {3}{7}}\left(1+\cdots \right)\right)\right)\end{aligned}}}

where m!! is the double factorial, the product of the positive integers up to m with the same parity. Euler:

      π
    
    =
    20
    arctan
    
    
      
        1
        7
      
    
    +
    8
    arctan
    
    
      
        3
        79
      
    
  

{\displaystyle {\pi }=20\arctan {\frac {1}{7}}+8\arctan {\frac {3}{79}}}

(Evaluated using the preceding series for arctan.) Ramanujan:

        1
        π
      
    
    =
    
      
        
          2
          
            
              2
            
          
        
        9801
      
    
    
      ∑
      
        k
        =
        0
      
      
        ∞
      
    
    
      
        
          (
          4
          k
          )
          !
          (
          1103
          +
          26390
          k
          )
        
        
          (
          k
          !
          
            )
            
              4
            
          
          
            396
            
              4
              k
            
          
        
      
    
  

{\displaystyle {\frac {1}{\pi }}={\frac {2{\sqrt {2}}}{9801}}\sum _{k=0}^{\infty }{\frac {(4k)!(1103+26390k)}{(k!)^{4}396^{4k}}}}

David Chudnovsky and Gregory Chudnovsky:

        1
        π
      
    
    =
    12
    
      ∑
      
        k
        =
        0
      
      
        ∞
      
    
    
      
        
          (
          
          1
          
            )
            
              k
            
          
          (
          6
          k
          )
          !
          (
          13591409
          +
          545140134
          k
          )
        
        
          (
          3
          k
          )
          !
          (
          k
          !
          
            )
            
              3
            
          
          
            640320
            
              3
              k
              +
              3
              
                /
              
              2
            
          
        
      
    
  

{\displaystyle {\frac {1}{\pi }}=12\sum _{k=0}^{\infty }{\frac {(-1)^{k}(6k)!(13591409+545140134k)}{(3k)!(k!)^{3}640320^{3k+3/2}}}}

Ramanujan's work is the basis for the Chudnovsky algorithm, the fastest algorithms used, as of the turn of the millennium, to calculate π.

=== Modern algorithms === Extremely long decimal expansions of π are typically computed with iterative formulae like the GaussLegendre algorithm and Borwein's algorithm. The latter, found in 1985 by Jonathan and Peter Borwein, converges extremely quickly: For

      y
      
        0
      
    
    =
    
      
        2
      
    
    
    1
    ,
     
    
      a
      
        0
      
    
    =
    6
    
    4
    
      
        2
      
    
  

{\displaystyle y_{0}={\sqrt {2}}-1,\ a_{0}=6-4{\sqrt {2}}}

and

      y
      
        k
        +
        1
      
    
    =
    (
    1
    
    f
    (
    
      y
      
        k
      
    
    )
    )
    
      /
    
    (
    1
    +
    f
    (
    
      y
      
        k
      
    
    )
    )
     
    ,
     
    
      a
      
        k
        +
        1
      
    
    =
    
      a
      
        k
      
    
    (
    1
    +
    
      y
      
        k
        +
        1
      
    
    
      )
      
        4
      
    
    
    
      2
      
        2
        k
        +
        3
      
    
    
      y
      
        k
        +
        1
      
    
    (
    1
    +
    
      y
      
        k
        +
        1
      
    
    +
    
      y
      
        k
        +
        1
      
      
        2
      
    
    )
  

{\displaystyle y_{k+1}=(1-f(y_{k}))/(1+f(y_{k}))~,~a_{k+1}=a_{k}(1+y_{k+1})^{4}-2^{2k+3}y_{k+1}(1+y_{k+1}+y_{k+1}^{2})}