about summary refs log tree commit diff
path: root/src/complex/cproj.c
blob: d2b8f5a972ada4f392d67b9967415092264a661f (plain) (blame)
1
2
3
4
5
6
7
8
#include "complex_impl.h"

double complex cproj(double complex z)
{
	if (isinf(creal(z)) || isinf(cimag(z)))
		return CMPLX(INFINITY, copysign(0.0, cimag(z)));
	return z;
}