blob: db16721fef37d8b1d731fde4d65515771eb92e9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include "__complex.h"
double complex cproj(double complex z)
{
double_complex w = { .z = z };
if (isinf(creal(z)) || isinf(cimag(z))) {
REAL_PART(w) = (double)INFINITY;
IMAG_PART(w) = copysign(0.0, cimag(z));
}
return (w.z);
}
|