Sign function

Function returning minus 1, zero or plus 1

Sign function

In mathematics, the sign function or signum function (from signum, Latin for "sign") is a function that has the value −1, +1 or 0 according to whether the sign of a given real number is positive or negative, or the given number is itself zero. In mathematical notation the sign function is often represented as sgn ⁡ x {\displaystyle \operatorname {sgn} x} or sgn ⁡ ( x) {\displaystyle \operatorname {sgn}(x)} .

From Wikipedia, under CC BY-SA. More on occurri.