signum()

The mathematical sign function.

-1 if a < 0.

0 if a = 0.

1 if a > 0.

Parameters


Parameter

Description

a

Numerical value.

Examples


Parameter a

Result

-7

-1

0

0

5

1

mystring

0 (Note: An implicit type conversion of each string to the numerical value 0 takes place internally.)