Compute the sign of a number
The sign function returns the sign of an arithmetic type. If
its argument is a complex number (Complex_Type), it returns
the sign of the imaginary part of the number. If the argument is an
array, a new array will be created whose elements are obtained from
the original array by using the sign function.
When applied to a real number or an integer, the sign function
returns -1, 0, or +1 according to whether the number is
less than zero, equal to zero, or greater than zero, respectively.
|