SIGN

Read syntax diagramSkip visual syntax diagram
>>-SIGN(number)------------------------------------------------><

returns a number that indicates the sign of number. The number is first rounded according to standard REXX rules, just as though the operation number+0 had been carried out. Returns -1 if number is less than 0; returns 0 if it is 0; and returns 1 if it is greater than 0.

Here are some examples:
SIGN('12.3')       ->     1
SIGN(' -0.307')    ->    -1
SIGN(0.0)          ->     0