What is the inverse function of $\sin: [-\pi,-\frac{\pi}{2}]\cup [\frac{\pi}{2},\pi]\to\mathbb{R}$?
We know that this function is injective and restricting its codomain to $[-1,1]$ makes it bijective. Obviously the inverse is not $\arcsin(\cdot):[-1,1]\to[-\frac{\pi}{2},\frac{\pi}{2}]$.
I am not 100% sure but I think that inverse function must attain the form of $g:[-1,1]\to [-\pi,-\frac{\pi}{2}]\cup [\frac{\pi}{2},\pi]$, where
\begin{align*} g(y):= \begin{cases} \arcsin(y)-\frac{\pi}{2},& y\in[-1,0]\\ \arcsin(y)+\frac{\pi}{2},& y\in[0,1]. \end{cases} \end{align*}
Correct?