LF Fortran 95

CONJG Function

Description

The CONJG function returns the conjugate of a complex number.

Syntax

CONJG (z)

Arguments

z is an INTENT(IN) scalar or array of type COMPLEX.

Result

The result is of type COMPLEX and has the same kind as z. Its value is z with the imaginary part negated.

Example

complex :: x=(.1,-.2),y(2)=(/(1.,0.),(0.,1.)/) write(*,*) conjg(x) ! writes (.1, .2) write(*,*) conjg(y) ! writes (1.,0.) (0.,-1.)