How do you calculate the decimal expansion of an irrational number? Just curious, how do you calculate an irrational number? Take $\pi$ for example. Computers have calculated $\pi$ to the millionth digit and beyond. What formula/method do they use to figure this out? How does it compare to other irrational numbers such as $\varphi$ or $e$?
 A: Gerry Myerson's answer above is correct in saying that different irrational numbers lead to different techniques. In essence, though, all those techniques boil down to one idea: Find some sort of method (formula, infinite series, algorithm, etc.) that when used, will yield a decimal expansion that will converge to the value of the irrational (or rational, for that matter!). Naturally, certain techniques are more useful in certain circumstances (e.g., in computing, techniques that converge very quickly, but also result in as few processor instructions as possible are preferred).
As an aside, my personal favorite formula for $\pi$ was given by Ramanujan:
$$
\frac{1}{\pi} = \frac{\sqrt{8}}{9801} \sum_{n=0}^{\infty}\frac{(4n)!}{(n!)^4}\frac{1103+26390n}{396^{4n}}
$$
This formula converges really really quickly. The MathWorld article notes that it provides, on average, 6 to 8 decimal places per term.
A: An example not yet given.
$\zeta(3)=1.20205690315959428539973816151144$
$\qquad\qquad 999076498629234049...$ (here)
The number $$\zeta (3)=\sum_{n=1}^\infty \frac{1}{n^3} \tag{1}$$ is called Apéry's constant, because its irrationality was first proved by Roger Apéry. The following series, which converges to $\zeta (3)$ faster than $(1)$, can be used to compute it
$$\zeta (3)=\frac{5}{2}\sum_{n=1}^{\infty }\frac{\left( -1\right) ^{n-1}}{n^{3}\binom{2n}{n}}.\tag{2}$$
For the same purpose we can use the continued fraction expansion for $\zeta (3)$, which is
$$\zeta \left( 3\right) =\dfrac{6}{5-\dfrac{1}{117-\dfrac{64}{535-...-\dfrac{n^{6}}{34n^{3}+51n^{2}+27n+5}}}}.\tag{3}$$
Another possibility is to use the following limit
$$\begin{equation*}
\zeta (3)=\lim_{n\rightarrow \infty }\frac{a_{n}}{b_{n}},
\end{equation*}\tag{4}$$
where
$$\begin{equation*}
a_{n}=\sum_{k=0}^{n}\binom{n}{k}^{2}\binom{n+k}{k}^{2}c_{n,k},
\end{equation*}\tag{5}$$
$$\begin{equation*}
b_{n}=\sum_{k=0}^{n}\binom{n}{k}^{2}\binom{n+k}{k}^{2},
\end{equation*}\tag{6}$$
and
$$\begin{equation*}
c_{n,k}=\sum_{m=1}^{n}\frac{1}{m^{3}}+\sum_{m=1}^{k}\frac{\left( -1\right)
^{m-1}}{2m^{3}\binom{n}{m}\binom{n+m}{m}}\quad k\leq n.
\end{equation*}\tag{7}$$
--
References
Apéry, Roger (1979), Irrationalité de $\zeta 2$ et $\zeta 3$, Astérisque 61: 11–13
Alfred van der Poorten (1979), A proof that Euler missed..., The Mathematical Intelligencer 1 (4): 195–203
A: For $\pi$ there is a nice formula given by John Machin:
$$ \frac{\pi}{4} = 4\arctan\frac{1}{5} - \arctan\frac{1}{239}\,. $$
The power series for $\arctan \alpha$ is given by
$$\arctan\alpha = \frac{\alpha}{1} - \frac{\alpha^3}{3}+\frac{\alpha^5}{5} - \frac{\alpha^7}{7} + \ldots\,. $$
Also you could use (generalized) continued fractions:
$$ \pi = \dfrac{4}{1+\cfrac{1^2}{3+\cfrac{2^2}{5+\cfrac{3^2}{7+\cdots}}}} $$
There are many other methods to compute $\pi$, including algorithms able to find any number of $\pi$'s hexadecimal expansion independently of the others. As I remember, the wikipedia has a lot on methods to compute $\pi$. Moreover, as $\pi$ is a number intrinsic to mathematics, it shows in many unexpected places, e.g. in a card game called Mafia, for details see this paper.
As for $e$, there are also power series and continued fractions, but there exists more sophisticated algorithms that can compute $e$ much faster. And for $\phi$, there is simple recurrence relation based on Newton's method, e.g. $\phi_{n+1} = \frac{\phi_n^2+1}{2\phi_n-1}$. It is worth to mention that the continued fraction for the golden ratio contain only ones, i.e. $[1;1,1,1,\ldots]$ and the successive approximations are ratios of consecutive Fibonacci numbers $\frac{F_{n+1}}{F_n}$.
To conclude, majority of example methods here was in one of the forms: computing better and better ratios (but each fraction was calculated exactly) or work with approximations the whole time, but create a process that will eventually converge to the desired number. In fact this distinction is not sharp, but the methods that are used in those approaches are usually different. Useful tools: power series, continued fractions, and root-finding.
A: Different irrationals yield to different techniques. $\phi=(1+\sqrt5)/2$ just involves calculating $\sqrt5$, which can be done easily by Newton's method from introductory calculus. The infinite series $$e=1+1+1/2+1/6+1/24+\cdots$$ where the denominators are the factorials, can be used to calculate $e$. For pi, this article on Gauss-Legendre algorithm will give you some ideas. 
