2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
28 .. index:: absolute value
30 ABS --- Absolute value
31 **********************
35 ``ABS(A)`` computes the absolute value of ``A``.
38 The type of the argument shall be an ``INTEGER``,
39 ``REAL``, or ``COMPLEX``.
42 The return value is of the same type and
43 kind as the argument except the return value is ``REAL`` for a
47 Fortran 77 and later, has overloads that are GNU extensions
53 .. code-block:: fortran
58 .. code-block:: fortran
63 complex :: z = (-1.e0,0.e0)
81 - Fortran 77 and later
85 - Fortran 77 and later
89 - Fortran 77 and later
93 - Fortran 77 and later