SIGN

Purpose:

Returns +1, 0 or -1 based on the sign of the input.

Syntax:

SIGN(x)

x

-

A scalar or series.

Returns:

A real, complex or series.

Example:

sign({10, 0, -10})

 

returns {1, 0, -1}

Remarks:

If the input is complex, SIGN returns x / mag(x). For example:

 

sign(3 + 4i)

 

returns 0.6 + 0.8i

See Also:

ABS

MAGNITUDE