1 /* $NetBSD: conj.c,v 1.2 2010/09/15 16:11:29 christos Exp $ */
4 * Written by Matthias Drochner <drochner@NetBSD.org>.
7 * imported and modified include for newlib 2010/10/03
8 * Marco Atzeri <marco_atzeri@yahoo.it>
13 <<conj>>, <<conjf>>---complex conjugate
22 double complex conj(double complex <[z]>);
23 float complex conjf(float complex <[z]>);
27 These functions compute the complex conjugate of <[z]>,
28 by reversing the sign of its imaginary part.
30 <<conjf>> is identical to <<conj>>, except that it performs
31 its calculations on <<floats complex>>.
34 The conj functions return the complex conjugate value.
37 <<conj>> and <<conjf>> are ISO C99
40 <<conj>> and <<conjf>> are ISO C99
45 #include "../common/fdlibm.h"
48 conj(double complex z
)
50 double_complex w
= { .z
= z
};
52 IMAG_PART(w
) = -IMAG_PART(w
);