Returns the sign of a value
Category: Mathematical
SIGN ( argument )
argument
is numeric.
The SIGN function returns a value of
-1 | if x < 0 |
| if x = 0 |
1 | if x > 0. |
SAS Statements | Results |
---|---|
x=sign(-5); | -1 |
x=sign(5); | 1 |
x=sign(0); |
|