sign

From ENIGMA

Jump to: navigation, search


Notation

sign(x)

Description

Returns the sign of the number. sign(-4) returns -1, sign(0) returns 0.

Parameters

  • x is a numeric argument whose sign (negative, positive, or 0) you are interested in obtaining.

Return Values

Returns the sign of x, one of -1 (for negative), 0, or 1 (for positive).

Example Call

Example of using the function.
Personal tools