ABS(A)

Purpose

Absolute value.

Class

Elemental function

Argument type and attributes

A
An INTENT(IN) 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  1   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
Note:
  •  1  IBM extension
  •  2  the ability to specify a nondefault integer argument.