[UP]


Manual Reference Pages  - aimag (3)

NAME

aimag(3f) - [FORTRAN:INTRINSIC:NUMERIC:TYPE] Imaginary part of complex number

SYNTAX

result = AIMAG(Z)

DESCRIPTION

AIMAG(Z) yields the imaginary part of complex argument Z. The IMAG(Z) and IMAGPART(Z) intrinsic functions are provided for compatibility with G77, and their use in new code is strongly discouraged.

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

Sample program:

    program demo_aimag
    use, intrinsic :: iso_fortran_env, only : real_kinds, &
    & real32, real64, real128
    implicit none
    complex(kind=real32) z4
    complex(kind=real64) z8
       z4 = cmplx(1.e0, 0.e0)
       z8 = cmplx(0.e0_real64, 1.e0_real64,kind=real64)
       print *, aimag(z4), aimag(z8)
    end program demo_aimag

STANDARD

[[FORTRAN 77]] and later

CLASS

Elemental function


aimag (3) March 11, 2021
Generated by manServer 1.08 from 66b238de-2c67-4d00-a054-a93d3a3b54cf using man macros.