Prove that $e^{i\pi z}=(-1)^z$ for all $z\in\mathbb{C}$
For a long time I believed that following reasoning is correct $e^{i\pi z}=(e^{i\pi})^{z}=(-1)^z$. Recently I discovered that $ e^{ab}=(e^a)^b$ is not true in general case. Could you provide me any hints?