# How calculate $\pi$ to an accuracy of 10 decimal places?

Let $a=3.00000000001234...$ (irrational number)

If $\overline{a}=3.00000000001$ (approximation $11$ places) then $|a-\overline{a}|<10^{-11}$

Note that the reciprocal is not satisfied:

If $\overline{a}=2.99999999998$ (approximation $0$ places) but $|a-\overline{a}|<10^{-10}$

How calculate $\pi$ to an accuracy of $10$ decimal places ?

Note that $|\pi-\overline{a}|<10^{-10}$ not guarantee the accuracy of one decimal place of $\pi$.

$\overline{a}:$ approximation

Any hints would be appreciated.

Hint: $\pi$ has an irrationality measure of no more than $7.6063$.

Your definition of number of places only has problems close to "rollovers of the odometer". I think it would be more normal to consider $11$ places satisfied when your decimal is within $\frac 5{10^{12}}$ so it rounds properly, even if the rounding propagates over many places. As $\pi \approx 3.141592653589793$ there is no rollover problem greater than one in these places. Once you find a digit other than zero or nine you are exempt from the rollover.

• It is more normal to think about accuracy that way but it does not answer the question. – Dan Brumleve Sep 1 '13 at 6:21

The following idea can be generalized to get better approximations of $\pi$:

$$\int_0^1\frac{x^4 (1-x)^4}{1+x^2}\,\text{d}x=\frac{22}{7}-\pi$$

$$\frac{1}{1260} = \int_0^1\frac{x^4 (1-x)^4}{2}\,\text{d}x < \int_0^1\frac{x^4 (1-x)^4}{1+x^2}\,\text{d}x < \int_0^1\frac{x^4 (1-x)^4}{1}\,\text{d}x = {1 \over 630}.$$

Thus we have $${22 \over 7} - {1 \over 630} < \pi < {22 \over 7} - {1 \over 1260}$$

Hence $3.1412... < \pi < 3.1421...$ in decimal expansion then $$\pi=3.14...$$

Accuracy of 2 decimal places.

• In general it may take a rational approximation of accuracy $10^{-7.6063 \cdot k}$ to guarantee $k$ correct digits. See my answer. – Dan Brumleve Sep 1 '13 at 18:29

just an idea:

We want to aproximate $A=a_0.a_1a_2\ldots a_n \ldots$ with $B=b_0.b_1b_2\ldots b_n \ldots$.

Claim 1: If $0<A-B<10^{-n-1}$ and $b_{n+1}\neq 9$ then $a_k=b_k \; \forall k\le n$.

Claim 2: If $0<B-A<10^{-n-1}$ and $b_{n+1}\neq 0$ then $a_k=b_k \; \forall k\le n$.

Proof of claim 1: Suppose $b_k\neq a_k$ for some $k\le n$ (for the sake of simplicity I will suppose $a_n\neq b_n$ and $a_k=b_k$ if $k<n$, but the proof is similar in the general case). Then

$$10^{-n-1}>A-B=\sum_j (a_j -b_j)10^{-j}>10^{-n} - |a_{n+1}-b_{n+1}|10^{-n-1} - 9 \sum_{j\ge n+2} 10^{-j} \\>10^{-n} -8 * 10^{-n-1} - 10^{-n-1} =10^{-n-1}$$ A contradiction.