FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-11
CONJG Function
Considerations
If you specify two arguments, they must be the same type: integer, real, or double
precision. The data type of the value returned by CMPLX is always complex.
For one argument of complex type, CMPLX (x) returns x. For one argument of
integer, real, or double precision type, CMPLX (x) is equivalent to CMPLX (x, 0).
If you specify both arguments, CMPLX (x, y) returns a complex number with a
real part equal to REAL (x) and an imaginary part equal to REAL (y).
Example of the CMPLX Function
REAL a
COMPLEX x
READ (*, *) a
x = CMPLX (a)
CONJG Function
The CONJG function returns the conjugate of a complex number.
z
is an arithmetic expression of complex type.
Considerations
If the argument is z = CMPLX (x, y), then the value of CONJG (z) is defined as
CMPLX (x, - y)
Note that for any complex number z = CMPLX (x, y),
CABS (z) =
and
z * CONJG (z) = CMPLX (x
2
+ y
2
, 0)
Example of the CONJG Function
COMPLEX a, b
b = CONJG (a)
CONJG ( z )
REAL Z
CONJG Z()()