TITLE: Irrational$^\text{Irrational}$
QUESTION [8 upvotes]: How do I compute $\text{(irrational)}^{\text{(irrational)}}$ up to a required number of decimals say m, in the fastest way ? (one way is of course compute both the irrational numbers to a precision much larger than m and then solve it... but you never know how much excess of m you will need to calculate the irrationals.. )

REPLY [3 votes]: This is a further development on the ideas of Doug Spoonwood and phv3773.
Exponentiation $a^b$ is a continuous function, in both arguments, so we can use "interval methods" to calculate a number to any desired precision. Now I'm guessing you are only interested in real numbers, so I guess I can assume $a>0$, and since $a^{-b}=1/a^b=(1/a)^b$, we can also restrict our attention to $a>1$ and $b>0$. For fixed $b>0$, $a^b$ (the power function) is a strictly increasing function for $a\in(0,\infty)$, and for fixed $a>1$, $a^b$ (an exponential function) is strictly increasing for $b\in\Bbb R$.
Now suppose $a\in[a_-,a_+]$ and $b\in[b_-,b_+]$. In your application this would correspond to having calculated the irrationals $a$ and $b$ to some precision, and $a_-,a_+$ are your rational upper and lower bounds on the number you have calculated. (For example, if I calculate $a=\pi\approx3.14$ to that many digits of precision, rounded correctly, then $a\in[a_-,a_+]=[3.135,3.145]$.) Because $a^b$ is increasing in both arguments in the region of discussion, I know $$a_-^{b_-}\le a_-^b\le a^b\le a_+^b\le a_+^{b_+}$$ and hence $a^b\in[a_-^{b_-},a_+^{b_+}]$. This is Doug's "interval exponentiation" (suitably simplified for the case when $a>1$ and $b>0$).
These represent pessimistic bounds on the number being calculated, but they give a guarantee that the number you want is actually in that range.

A natural second question related to this process is which $a_-,a_+,b_-,b_+$ to choose. If you have an effective method for calculating $a$ and $b$ to whatever precision you need, then that means you can demand $a_+-a_-\le\delta$ and  $b_+-b_-\le\delta'$ with your choice of $\delta,\delta'$. Our true goal is to get the range of our interval within some $\epsilon$, which is to say $a_+^{b_+}-a_-^{b_-}\le\epsilon$. A good estimate of what $\delta,\delta'$ to choose can be given by taking the partial derivatives of $a^b$ at the point of approximation:
$$(a+\alpha)^{b+\beta}\approx a^b+\alpha\frac\partial{\partial a}a^b+\beta\frac\partial{\partial b}a^b=a^b(1+\alpha \frac ba+\beta\log a)$$
(where $|\alpha|\le\delta/2$ and $|\beta|\le\delta'/2$). For good approximations, we want these two error terms to be comparable to one another. Thus we want $\frac{\delta a}b\approx\frac{\delta'}{\log a}\approx\frac\epsilon2a^b$. (I realize that this requires the computation of $a^b$, but this is just an estimate and need not be very accurate. The true test is when you calculate $a_+^{b_+}$ and $a_-^{b_-}$ and find that the difference is within your error bounds. If it isn't, just cut $\delta,\delta'$ in half until it is.)