Skip to Content

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:

+1for positive numbers
0for zero
-1for negative numbers

Syntax

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

Associated Keywords

ABS

Last updated on