Looking at asymptotic expansions for the imaginary error function I find the following for $z\in\Bbb C\setminus\{0\}$: $$ \tag{1} \frac{z}{\sqrt{-z^2}}= \begin{cases} -i, &\operatorname{arg}(z)\leq 0\\ i, &\text{otherwise}. \end{cases} $$ Is this correct? How is this derived from first principles? Can we state this without the use of cases, e.g. $z/\sqrt{-z^2}=\operatorname{sign}(\operatorname{arg}(z))i$?
My thoughts:
If this holds for $z\in\Bbb C\setminus\{0\}$ then it certainly holds for the special case $z\in\Bbb R\setminus \{0\}$. Assuming the case where $z$ is real we could write $$ \tag{2} \frac{z}{\sqrt{-z^2}}=\frac{z}{i\sqrt{z^2}}=\frac{z}{i|z|}=-\operatorname{sign}(z)i, $$ but this does not agree with $(1)$ as it has the wrong sign. Clearly I'm missing something here. Maybe we have to properly define the branch cut for $\sqrt\cdot$ and specify $\operatorname{arg}(z)\in(-\pi,\pi]$?
Edit:
According to WA (which presumably uses same branch cut as Mathematica)
$$ \begin{array}{cc} z &z/\sqrt{-z^2}\\ 1 &-i\\ 1+i &i\\ i &i\\ -1+i &i\\ -1 &i\\ -1-i &-i\\ -i &-i\\ 1-i &-i \end{array} $$
Too long as a comment.