It has been known since Pythagoras that $\sqrt{2}$ is irrational. It is also obvious that $\sqrt{4}$ is rational. There is also a fun proof that even the power of two irrational numbers can be rational.
Can you, in general, compute whether the power of two rational numbers is rational?
The reason I am asking, besides curiosity, is that the Fraction-type in Python always returns a float on exponentiation. If there is a quick way to tell if it could be accurately expressed as a fraction, the power function could conceivably only return floats when it has to.
EDIT: By popular demand, I changed $0.5$ to $\displaystyle\frac{1}{2}$ to make it clearer that it is a fraction and not a float.
irrational^irrational = rational, without complex numbers, if you know of one? – ninjagecko Feb 29 '12 at 17:314 ** Fraction(1, 2)instead of4^0.5thought) – Feb 29 '12 at 17:38