The sign function (or
signum function) $\sgn:
\R \to \R $ is the real-valued function on
$\R $ defined by
\[
\sgn(x) = \begin{cases}
-1 & \text{ if } x < 0 \\
0 & \text{ if } x = 0 \\
1 & \text{ if } x > 0 \\
\end{cases}
\]