Instruction

1

π is an irrational

**number**. This means that it cannot be represented as a fraction with integer numerator and denominator. Moreover, π is a transcendental**number**, i.e. it cannot serve as a solution to any algebraic equation. Thus, the exact value of the number π cannot be written. However, there are methods to calculate it with any required degree of accuracy.2

The earliest approach used by the geometers of Greece and Egypt, they say that π is approximately equal to the square root of 10, or fraction 256/81. But these formulas give the value of π, equal to 3.16, and this is clearly not enough.

3

Archimedes and other mathematicians have calculated π using geometric complex and time-consuming procedure — measuring the perimeters of inscribed and circumscribed polygons. The obtained value is 3,1419.

4

Another approximate formula determines that π = √2 + √3. It gives a value for π, is approximately equal to 3,146.

5

With the development of differential calculus and other mathematical disciplines at the disposal of scientists a new tool — power series. Gottfried Wilhelm Leibniz in 1674 found that the infinite series

1 - 1/3 + 1/5 - 1/7 + 1/9... + (1/(2n+1)*(-1)^n

in the limit converges to a sum equal to π/4. To calculate this amount just, however, to achieve sufficient accuracy, it will take a lot of steps, because the series converges very slowly.

1 - 1/3 + 1/5 - 1/7 + 1/9... + (1/(2n+1)*(-1)^n

in the limit converges to a sum equal to π/4. To calculate this amount just, however, to achieve sufficient accuracy, it will take a lot of steps, because the series converges very slowly.

6

Later were found and other power series that can calculate PI faster than using the Leibniz series. For example, it is known that tg(π/6) = 1/√3 hence arctg(1/√3) = π/6.

The arc tangent function is expanded in a power series, and for the given values we get:

π = 2√3*(1 - (1/3)*(1/3) + (1/5)*(1/3)^2 - (1/7)*(1/3)^3... + 1/((2n + 1)*(-3)^n)...)

With this and other similar formulas for

The arc tangent function is expanded in a power series, and for the given values we get:

π = 2√3*(1 - (1/3)*(1/3) + (1/5)*(1/3)^2 - (1/7)*(1/3)^3... + 1/((2n + 1)*(-3)^n)...)

With this and other similar formulas for

**the number**π was calculated with an accuracy of millions of decimal places.7

For most practical calculations it is enough to know

**the number of**π accurate to seven decimal places: 3,1415926. It can be easily remembered with the mnemonic phrase: "Three — fourteen — fifteen — ninety-two and six".Note

There are many ways to calculate the number PI. The most simple and straightforward numerical method is Monte Carlo, which are reduced to simple enumeration of points in the square. double y=radius*radius-x*x; return y; } the Program prints the value of PI depending on the radius and number of points. The only thing that is left to the reader is to compile it yourself and run with the options that he wants.

Useful advice

But the indefatigable scientists went on to calculate decimal digits of PI, what is actually wildly non-trivial task, because just like in a column not to calculate: the number is not only irrational, but also transcendental (it's just these numbers that are calculated by simple equations). Scientists at Tokyo University have managed to set a world record in the computation of PI to 12411-trillion mark.