8.10 AIMAG
— Imaginary part of complex number
- Description:
-
AIMAG(Z)
yields the imaginary part of complex argumentZ
. TheIMAG(Z)
andIMAGPART(Z)
intrinsic functions are provided for compatibility withg77
, and their use in new code is strongly discouraged. - Standard:
- Fortran 77 and later, has overloads that are GNU extensions
- Class:
- Elemental function
- Syntax:
-
RESULT = AIMAG(Z)
- Arguments:
-
Z The type of the argument shall be COMPLEX
. - Return value:
- The return value is of type
REAL
with the kind type parameter of the argument. - Example:
-
program test_aimag complex(4) z4 complex(8) z8 z4 = cmplx(1.e0_4, 0.e0_4) z8 = cmplx(0.e0_8, 1.e0_8) print *, aimag(z4), dimag(z8) end program test_aimag
- Specific names:
-
Name Argument Return type Standard AIMAG(Z)
COMPLEX Z
REAL
GNU extension DIMAG(Z)
COMPLEX(8) Z
REAL(8)
GNU extension IMAG(Z)
COMPLEX Z
REAL
GNU extension IMAGPART(Z)
COMPLEX Z
REAL
GNU extension
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gfortran/AIMAG.html