Borland C++ reference

conj

raw OCR

Returns the complex conjugate of a complex number.

Defined in header <complex.h>

Syntax

#include <complex.h>
complex  conj(complex x);

Portability

DOSUNIXWindowsANSI CC++ only
■■■

Remarks

conj (z) is the same as complex (real (z), -imag(z)).

Return value

The complex conjugate of the complex number.

See also

Example

#include <iostream.h>
#include <complex.h>

int main(void)
{
   double X = 3.1, y = 4.2;
   complex z = complex(x,y);
   cout << "z = " << z «  "\n";
   cout << "  has real part = " << real(z) << "\n";
   cout << "  and imaginary real part = " «  imag(z) << "\n";
   cout << "z has complex conjugate = " << conj(z) << "\n";
   return 0;
)

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.