<s>[INST] What is the principal root of $\sqrt{-i}$? Where is the mistake in this solution?

$$\sqrt{-i}=\sqrt {\cos \frac{3 \pi}2+i\sin \frac{3 \pi}2}=\cos \frac{3 \pi}4+i\sin \frac{3 \pi}4=-\frac{\sqrt 2}2+i \frac{\sqrt 2}2$$

WA gives me different result:

$$\frac{\sqrt 2}2-i \frac{\sqrt 2}2$$

Why the principal root must be equal to $\frac{\sqrt 2}2-i \frac{\sqrt 2}2$?
I used Moivre's formula. But I dont know. How can I must choose value of $k$ in Moivre's formula? I chose $k=0$.
$$z=r\left(\cos x+i\sin x\right)$$
$$z^{\frac 1n}=r^\frac1n \left( \cos \frac{x+2\pi k}{n} + i\sin \frac{x+2\pi k}{n}\right)$$
 [/INST] Let $\sqrt{-i} = a + bi$, so $-i = (a+bi)^2 = a^2 - b^2 + 2abi$.
Equating real values, $0 = a^2 - b^2$, and equating imaginery parts, $-1 = 2ab$.  
Solving these simultaneously gives us either $a=\frac{1}{\sqrt 2}, b=\frac{-1}{\sqrt 2}$ or $a=\frac{-1}{\sqrt 2}, b=\frac{1}{\sqrt 2}$.  
Thus, $\sqrt{-i} = \pm \frac{1}{\sqrt 2}(1-i)$.
</s>