Name
sign — returns -1, 0, or 1 depending on the sign of its numerical
Synopsis
sign
(
|
num
numeric
); |
Description
sign returns either -1, 0 or 1 depending whether its numeric argument is negative, zero or positive.
sign(-12) -> -1
sign(0) -> 0
sign(910) -> 1
sign(atof('-1.23456789')) -> -1
sign(0.0) -> 0