Sign function

maths
Sign function

The sign function $\mbox{sgn}: \mathbb{R} \rightarrow \{1,-1\}$ just takes the sign of the value

$$\mbox{sgn}(x) = \begin{cases} 1 & \mbox{if } x \geq 0\\ -1 & \mbox{if } x < 0 \end{cases}$$

with where is sends one can be custom based on the application.