Name
conj
Synopsis
Obtains the conjugate of a complex number
#include <complex.h> double complexconj
( double complexz
); float complexconjf
( float complexz
); long double complexconjl
( long double complexz
);
The conj()
function returns
the complex conjugate of its complex argument. The conjugate of a
complex number x
+
y
i, where
x
and y
are
the real and imaginary parts, is defined as
x
−
y
i. Accordingly, the
conj()
function calculates the
conjugate by changing the sign of the imaginary part.
Example
See the example for cabs()
in this
chapter.
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.