SIGN

Member Of Menu: 
Complex
Real
Argument Types: 
Real
Complex
Symbol
Expression
Result Type(s): 
Real
Complex
Expression
Invertible: 
No
Valid In Expression: 
Yes
Stack Diagram: 
Real1 Real2
Complex1 Complex2
Symbol1 Expression2
Expression1 Expression2

If given a positive real value, this function returns 1. If the real value is 0, this function returns 0. If this real value is negative, this function returns -1.

For complex inputs, this function returns a complex value with the same ARG (ie angle) but its ABS is 1. If you treat the complex value as a vector from the origin, then the result points in the same direction but the length of the resulting vector is 1, regardless of the length of the input vector. The exception is if the input complex value is (0, 0). In that case, the result is also (0, 0).