About the calculation of decimal digits of series up to the nth digit Considering that we don't know any of the digits of some number defined as the limit up to infinity of a sum, I want to know how many terms do I have to sum to get the correct decimal representation, for example, up to the nth digit.
For example, consider this sum:
$$\displaystyle \frac \pi 4 = 1 - \frac 1 3 + \frac 1 5 - \frac 1 7 + \frac 1 9 - \cdots$$
How do I know when I'll get the correct decimal representation for $\frac{\pi}{4}$ up to the 10th digit, for example?
Basically I wanna know if there is a general method for this type of calculation. I apreciate any kind of help.
 A: Let 
$$S = 1 - \dfrac13 + \dfrac15 - \dfrac17 \pm$$
First note that truncating at the odd term, i.e., if you truncate at the $51^{st}$ term, we get
$$S_{101} = 1-\dfrac13 + \dfrac15 - \dfrac17 + \cdots + \dfrac1{101}$$
If we truncate at even term, i.e., if you truncate at the $52^{nd}$ term, we get
$$S_{103} = 1-\dfrac13 + \dfrac15 - \dfrac17 + \cdots + \dfrac1{101} - \dfrac1{103}$$
It is trivial to note that
$$S_{103} < S < S_{101}$$
Hence, we have
$$\left \vert S - S_{101} \right \vert < S_{101}-S_{103} = \dfrac1{103}$$
This hence gives us two digits accuracy. You can extend this to get more accuracy.
Be aware in mind that the Madhava series converges very slowly to $\dfrac{\pi}4$.
Hence, two get $10$ digits accuracy you need to go till $S_{10^{10}-1}$.
A: Notice the terms in this series decrease in absolute value and alternate in sign. This means that the partial sums of the series approach the actual sum in a zigzagging way. The first partial sum is $1$, wich is bigger than the actual sum, $1-1/2$ goes down and is smaller then, then $1-1/2+1/3$ increases, but doesn't go above $1$, and so on.
This means that the actual sum of the series is always between any two consecutive partial sums. 
If the difference of two consecutive partial sums is smaller than $10^{-k}$ then you have $k-1$ digits.
The difference of two consecutive partial sums is the term of the series. In your case $1/n$. So, if $1/n<10^{k}$ you have $k-1$ digits.
A: In general this may be difficult:
Consider $1-\frac{1}{3}+\frac{1}{9}-\frac{1}{27}+\frac{1}{81}-\cdots$ where you take as many terms as it takes step for a given computer program to halt (and an infinite number of terms if it does not halt).  
The first decimal place is $7$ if there are three or more steps but you may have difficulty determining the second decimal place ($4$ or $5$) or later decimal places, given the halting problem. 
