sign

sign(x)

Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.

Try it yourself:

See also:
All functions