summaryrefslogtreecommitdiff
path: root/lib/libm/conj.c
blob: 614e7bd21f6b838250d4055d2e474923a21dc2dc (plain)
1
2
3
4
5
6
7
8
9
10
#include "__complex.h" // for IMAG_PART, double_complex

#include <complex.h> // for complex, conj

double complex conj(double complex z)
{
	double_complex w = { .z = z };
	IMAG_PART(w) = -IMAG_PART(w);
	return (w.z);
}