AIMAG(Z), IMAG(Z)
Purpose
Imaginary part of a complex number.
Class
Elemental function
Argument type and attributes
- Z
- An INTENT(IN) COMPLEX
Result type and attributes
Real with the same kind type parameter as Z.
Result value
If Z has the value (x,y), the result has the value y.
Examples
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 |
Note:
- IBM extension.
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.


