Imaginary part of a complex number.
Elemental function
Real with the same kind type parameter as Z.
If Z has the value (x,y), the result has the value y.
AIMAG ((2.0, 3.0)) has the value 3.0.
Specific Name | Argument Type | Result Type | Pass As Arg? |
---|---|---|---|
AIMAG | default complex | default real | yes |
DIMAG 1 | double complex | double precision real | yes |
QIMAG 1 | COMPLEX(16) | REAL(16) | yes |
In Fortran 2008, you can use designator%IM to access the imaginary part of complex numbers directly; for instance, Z%IM has the same value as AIMAG(Z). For more information about complex part designators, see Complex.