2.0
3.0
>
lang
>
sgn
Previous
Next
Edit
Rename
Undo
Refresh
Search
Administration
Documentation
History
Sgn
Sign
= Sgn (
Number
AS Float
)
Returns the sign of a number.
If the number is zero, it returns zero.
If the number is strictly positive, it returns the integer number +1.
If the number is strictly negative, it returns the integer number -1.
Example
PRINT Sgn(Pi)
1
PRINT Sgn(-Pi)
-1
PRINT Sgn(0)
0
See also
Arithmetical Functions