ABS

The ABS function returns the absolute value of its argument.

Calling Sequence

Result = ABS( X )

Arguments

X

The value for which the absolute value is desired. If X is of complex type, ABS returns the magnitude of the complex number:

If X is of complex type, the result is returned as single-precision, floating-point type. For all other types, the result has the same type as X . If X is an array, the result has the same structure, with each element containing the absolute value of the corresponding element of X .

Example

To print the absolute value of -25, enter:

PRINT, ABS(-25)

25