To return the signum of a number

You can use the function to determine the sign of a number. The return value is either **1** (positive number) or **-1** (negative number). The number **0 **is considered positive.

Syntax

sign(number)

Return

number

Examples

`sign(x)`

To return the signum of number x.

**Result:** 1

**Result:** -1

**Result:** 1

**Result:** 1

See also

`even`

, which returns Yes (`true`

) if the number is even.

`odd`

, which returns Yes (`true`

) if the number is odd.