Current location - Education and Training Encyclopedia - Graduation thesis - How is pi calculated?
How is pi calculated?
The ancients generally used the tangent circle method to calculate pi. In other words, the circumference of a circle is approximated by a regular polygon inscribed or circumscribed. Archimedes used a regular 96-sided polygon to get the precision of three decimal places of pi; Liu Hui uses a regular 3072 polygon to get a precision of 5 digits; Rudolph used a regular 262-sided polygon to obtain 35-bit accuracy. This geometry-based algorithm is computationally intensive, slow and thankless. With the development of mathematics, mathematicians have found many formulas for calculating pi intentionally or unintentionally in mathematical research. Here are some classic commonly used formulas. In addition to these classical formulas, there are many other formulas and formulas derived from these classical formulas, so I won't list them one by one. 1, Ma Qing formula π = 16 arctangent 1/5-4 arctangent 1/239 This formula was discovered by John Ma Qing, a British astronomy professor, in 1706. He used this formula to calculate the pi of 100. Ma Qing formula can get 1.4 decimal precision for each calculation. Because its multiplicand and dividend are not greater than long integers in the calculation process, it is easy to program on the computer. There are many arctangent formulas similar to Ma Qing's formula. Of all these formulas, Ma Qing's seems to be the fastest. Even so, if we want to calculate more digits, such as tens of millions, Ma Qing's formula is not enough. 2.Ramanukin formula 19 14 Indian genius mathematician Ramanukin published a series of *** 14 formulas for calculating pi in his paper. This formula can get the precision of 8 decimal places for each calculation. 1985, Gosper used this formula to calculate the digits of17,500,000 of pi. 1989 David chudnovski and Gregory chudnovski improved Lamanukin formula, which is called chudnovski formula, and the decimal precision of 15 can be obtained every time. 1994, Chu and Denovski brothers used this formula to calculate 4.044 billion. Another form of chudnovski formula that is more convenient for computer programming is: 3. Gauss-Legendre formula of AGM algorithm;

circumference ratio

Every iteration of this formula will get double decimal precision, for example, to calculate 654.38+0 million bits, 20 iterations is enough. 1September, 1999, Japanese Gao Qiao Jing Daole and Jintian were using this algorithm to calculate the digits of pi of 206158,430,000, setting a new world record. 4. Four iterations of Polvin: This formula was published by Jonathan Polvin and Peter Polvin in 1985. 5.bailey-borwein-plouffe Algorithm This formula is abbreviated as BBP formula, which was proposed by David Bailey, Peter Borwein and simon plouffe in1995 * *.

Chudnovski formula

Watch this. It breaks the traditional algorithm of pi, and can calculate any nth bit of pi without calculating the previous n- 1 bit. This provides feasibility for distributed computing of pi. 6. Chu Denovski Formula This formula was discovered by Chu Denovski brothers, which is very suitable for computer programming and is a relatively fast formula used by computers at present. The following is a simplified version of this formula: 7. Leibniz formula π/4 =1-1/3+1/7+1/9-110.