conjf, conj, conjl - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# conjf, conj, conjl

From cppreference.com
< c‎ | numeric‎ | complex

Defined in header `<complex.h>` |  |
float complex conjf( float complex z ); |  | (since C99)
double complex conj( double complex z ); |  | (since C99)
long double complex conjl( long double complex z ); |  | (since C99)

Computes the complex conjugate of `z` by reversing the sign of the imaginary part.

### [edit] Parameters

z | - | complex argument

### [edit] Return value

The complex conjugate of `z`.

### [edit] Example

Run this code

    #include <stdio.h>
    #include <complex.h>

    int main(void)
    {
        double complex z = conj(1.0 + 2.0*I);
        printf("%f%+fi\n", creal(z), cimag(z));

        return 0;
    }

Output:

    1.000000-2.000000i

### [edit] See also

C++ documentation for conj

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/complex/conj&oldid=71704"