SGN
A function returning -1 for negative argument, 0 for zero argument and +1 for positive argument.
X=SGN(Y)
result=SGN(answer)You can use this function to determine whether a number is positive, negative or zero.
SGN returns:
| +1 | for positive numbers |
| 0 | for zero |
| -1 | for negative numbers |
Syntax
<n-var>=SGN(<numeric>)Associated Keywords
ABS
Last updated on