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.

Syntax

<n-var>=SGN(<numeric>)

Associated Keywords

ABS