Given a positive number $x>0$ and a complex number $y\in\mathbb{C}$, is it justified to write the following?
$$(-x)^y=(e^{i\pi+\log(x)})^y=e^{i\pi y+y\log(x)}=e^{i\pi y}x^y$$
I am asking, since I worry that one can have more than one representation of $-1$:
$$-1=e^{i\pi+2\pi in}~~~,~~~n\in\mathbb{Z}$$
and $e^{i\pi y+2\pi iny}$ might have several distinct values for various $y$.
EDIT:
But I also feel like my worries are not really justified, since even for a positive number to a complex power we could write
$$x^y=(e^{\log(x)+2\pi i n})^y=e^{y\log(x)+2\pi i n y}=e^{2\pi i n y}x^y$$
Clearly, the extra $e^{2\pi i n y}$ appeared out of thin air and should not be there. After all, it is just $1^y=1$. So I'm inclined to think that $(-x)^y=e^{i\pi y}x^y$ is true as well. Any objections?