summaryrefslogblamecommitdiff
path: root/src/complex/cproj.c
blob: 1cf9bb949af6ae88e67642d71cc7ff741476f943 (plain) (tree)
1
2
3
4
5
6
7
8







                                                                
#include "libm.h"

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