Which of the following approximations of π, best delimits the propagation of uncertainty

47 Views Asked by At

Which of the following approximations of $\pi,$ best delimits the propagation of uncertainty:

(a) $\pi = 4(1-1/3+1/5-1/7+1/9...)$

(b) $\pi = 6 \Bigg(0.5 + \dfrac{0.5^3}{2 \times 3} + \dfrac{3 \times 0.5^5}{2 \times 4 \times 5} + \dfrac{3 \times 5 \times 0.5^7}{2 \times 4 \times 6 \times 7} + ... \Bigg) $

1

There are 1 best solutions below

0
On

As JeanMarie commented, you will get less floating point error the fewer operations you use to achieve the desired accuracy.

Note that as alternating series, the first series, $\pi=4·\arctan(1)$, has the absolute value of the next term as an error bound for a partial sum, while the remainder of the second series,$\pi=6·\arcsin(0.5)$, can be bound by a geometric series to be about two times the next term after the partial sum.

Thus the error the first series reduces as $\frac1n$, while the error of the second reduces as $\frac1{2^n}$. To get an error of about $10^{-M}$, the first series needs $n=10^M$ terms, introducing rounding errors that accumulate to the magnitude of $10^M\mu$, while the second series needs about $n=(3M)/10$ terms, reducing the accumulated floating point errors accordingly.

The en-wikipedia has articles on $\pi$ and the numerical computation of $\pi$ with several ideas to get higher accuracy faster. The ones close to this task are the Euler-Machin formulas combining several arctan computations with small arguments.