sign()
Sign of a numeric expression
Syntax
sign(x)
Arguments
- x: A real number.
Returns
- The positive (+1), zero (0), or negative (-1) sign of the specified expression.
Examples
print s1 = sign(-42), s2 = sign(0), s3 = sign(11.2)
Results
| s1 | s2 | s3 |
|---|---|---|
| -1 | 0 | 1 |