sign

Arithmetic
Name: sign

Category: Arithmetic

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

Syntax:
    sign(x)

Examples:
    sign(3.5)
        1
    sign(-4.2)
        -1
    sign(0)
        0

See also: abs