How to raise -1 to non-integer powers How do you calculate $(-1)^x$ where $x$ is some real number. For example, what is $(-1)^{\sqrt{5}}$. This question came as I was trying to computer $e^{i\pi a}$ where $a$ is irrational.

In general, for complex numbers (with $a \ne 0$) $a^b$ is defined as $e^{b \log(a)}$.  However, $\log(a)$ is a multivalued function, and therefore so is $a^b$.
