Approximation of pi Given that $\frac{\pi^2}{6}=\sum_{n=1}^{\infty}\left(\frac{1}{n^2}\right)$, I have to write a program in C that finds an approximation of $\pi$ using the formula $S_n=\sum_{i=1}^{n}\left(\frac{1}{i^2}\right)$.
Then the approximation is: $\sqrt{6\cdot S_n}$
Could you tell me the result for $n=100$ so I can check if my output is right??
Thanks in advance!
Could you tell me why calculating this backwards, it approximates better the sum?

The reason why calculating it backwards may be a good idea depends on the computer implementation of floating point numbers. If for instance you try to add a very small number (say $10^{-15}$) to a much larger number (say $1$), the result will still be $1$ due to the limited precision. Thus, it's always a good idea to start adding the smaller numbers first.
