ABS(A)

Purpose

Absolute value.

Class

Elemental function

Argument type and attributes

A
must be of type integer, real, or complex.

Result type and attributes

The same as A, except that if A is complex, the result is real.

Result value

Examples

ABS ((3.0, 4.0)) has the value 5.0.

Specific Name Argument Type Result Type Pass As Arg?
IABS any integer  2  same as argument yes
ABS default real default real yes
DABS double precision real double precision real yes
QABS  1  REAL(16) REAL(16) yes
CABS default complex default real yes
CDABS  1  double complex double precision real yes
ZABS  1  double complex double precision real yes
CQABS  1  COMPLEX(16) REAL(16) yes
Notes:
  1. IBM Extension.
  2. IBM Extension: the ability to specify a nondefault integer argument.