Returns +1, 0 or -1 based on the sign of the input.
SIGN(x)
|
x |
- |
A scalar or series. |
A real, complex or series.
sign({10, 0, -10})
returns {1, 0, -1}
If the input is complex, SIGN returns x / mag(x). For example:
sign(3 + 4i)
returns 0.6 + 0.8i