I was doing a Quantum Mechanics problem and came across the quantity $(-1)^{(-{1\over2})}$ within an infinite square well wavefuntion of $\Psi(x,t)=\Psi_1+e^{i\phi}\Psi_2$ and asked to analyze its mathematical behavior when $\phi=0,\pi,\pi/2$, and $\pi/2$ in my $\Psi_2$ presented the problem. I can't find any resources in my textbook or online about this quantity, except for this post, which didn't totally address my concern. How should complex numbers be treated in such a situation? It seems almost dependent on an order of operation, but there are two possible results: $i$ and $-i$. $$(-1)^{(-{1\over2})} = {(-1)^{{(-1)^{({1\over2})}}}} = \left({1\over-1}\right)^{({1\over2})} = \left({1\cdot(-1)\over(-1)\cdot(-1)}\right)^{({1\over2})} = (-1)^{({1\over2})} = i$$ or omission of the num & denom multiplication of $(-1)$ could result in the same output as below: $$(-1)^{(-{1\over2})} = {(-1)^{{({1\over2})^{(-1)}}}} = (i)^{(-1)} = \left({1\over i}\right) = \left({1\cdot i\over i\cdot i}\right) = \left({i \over -1}\right) = \left({i\cdot(-1)\over(-1)\cdot(-1)}\right) = -i$$ As the other post mentioned, online calculators favor the second result, but I couldn't glean whether there was a reason for that bias. Between these two (or something else), is there a more correct or conventional result, especially in Quantum Mechanics? I know that square roots yield both positive and negative results, but I beleive that only applies to real numbers, and I haven't yet learned enough complex analysis to know how they're treated in complex spaces.
Any help would be appreciated!