When do we know for sure that we have the correct digits of an irrational number? This comes from a programming assignment I was given using MATLAB. The objective was to calculate the difference between $\pi/4$ and the Leibniz series for computing $\pi/4$ with $n = 200$. 
This series appears to converge relatively slowly, and so at what point can we confidently say that "the 576th digit is 3" of an irrational number? Do we just take the approximation out to a million terms and assume that the first couple of hundred terms are the correct numbers? 
Or in other words, how do we tell, given an approximation (given by a series or whatnot) that the given digit in a certain place is the "correct" digit as opposed to a part of the error in the approximation? 
 A: A very crude estimate of the error of an alternating series is that is at most the next term. In the case of Leibniz,
$$ \left| \frac \pi 4 - \left(1 - \frac 13 + \frac 15 - \cdots + \frac{(-1)^n}{2n+1} \right) \right| < \frac{1}{2n+3}.$$
Once you have gotten as far (say) as $\frac \pi 4 = 0.7853\ldots$, as long as $\frac{1}{2n+3} < .0003$ you are guaranteed that the third digit is $5$.
This isn't a very good way of computing $\frac \pi 4$.  
More generally, a variety of methods exist to estimate the difference between the limit of a series and its partial sums, sometimes very sophisticated, but no universal strategy exists.
A: The way you can tell how many digits you have computed is by providing a bound on the remainder term for the series (i.e., of $R_k=\sum_{n=k+1}^\infty a_n$).  Say you want $m$ digits, then you want $10^{-m}>\left|{R_k}\right|$.
For the Liebniz series $\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}$, since it is an alternating series, we know that the remainder term is bounded by $\frac{1}{2n+1}$ itself, and so if you want $m$ digits of $\frac{\pi}{4}$, $\frac{10^m-1}{2}$ terms would be sufficient (quite a few).
For other series, sometimes Tayor's theorem can be used to provide a bound on the remainder term.
