ABS(3f)

DESCRIPTION
ABS(A) computes the absolute value of A.

STANDARD
Fortran 77 and later, has overloads that are GNU extensions

CLASS
Elemental function

SYNTAX
RESULT = ABS(A)

ARGUMENTS

A The type of the argument shall be an INTEGER, REAL, or COMPLEX.

RETURN VALUE
The return value is of the same type and kind as the argument except the return value is REAL for a COMPLEX argument.

EXAMPLE
          program test_abs
            integer :: i = -1
            real :: x = -1.e0
            complex :: z = (-1.e0,0.e0)
            i = abs(i)
            x = abs(x)
            x = abs(z)
          end program test_abs

SPECIFIC NAMES

Name Argument Return type Standard ABS(A) REAL(4) A REAL(4) Fortran 77 and later CABS(A) COMPLEX(4) A REAL(4) Fortran 77 and later DABS(A) REAL(8) A REAL(8) Fortran 77 and later IABS(A) INTEGER(4) A INTEGER(4) Fortran 77 and later ZABS(A) COMPLEX(8) A COMPLEX(8) GNU extension CDABS(A) COMPLEX(8) A COMPLEX(8) GNU extension

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).