Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C99 |
both | z/OS V1R7 |
#include <complex.h>
double complex conj(double complex z);
float complex conjf(float complex z);
long double complex conjl(long double complex z);
Function | Hex | IEEE |
---|---|---|
conj | X | X |
conjf | X | X |
conjl | X | X |
If successful, they return the complex conjugate value.
/*
* This example illustrates the complex conjugate function
*/
#include <complex.h>
#include <stdio.h>
void main()
{
long double complex z = -2.99 - I*3.99, zres;
zres = conjl(z);
printf("The complex conjugate of %Lf + %Lf*I is %Lf + %Lf*I\n",creall(z), cimagl(z), zres);
}
Output
The complex conjugate of -2.990000 + -3.990000*I is -2.990000 + 3.990000*I