I’d like to add the sign function to the atom library but so far I haven’t been successful. Actually, I’d like to use a slightly modified version (equal to 1 when evaluated at 0) defined as

\mathop{\text{signum}}(x) = \begin{cases}
1 & \text{if } x \geq 0, \\
-1 & \text{if } x < 0.
\end{cases}

Can anyone point me in the right direction for adding this function?