blob: b5035230f64ed1f7477c648ff52762588cfc255e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "__complex.h" // for IMAG_PART, REAL_PART, long_double_complex
#include <complex.h> // for cimagl, complex, cprojl, creall
#include <math.h> // for copysignl, isinf, INFINITY
long double complex cprojl(long double complex z)
{
long_double_complex w = { .z = z };
if (isinf(creall(z)) || isinf(cimagl(z))) {
REAL_PART(w) = (long double)INFINITY;
IMAG_PART(w) = copysignl(0.0L, cimagl(z));
}
return (w.z);
}
|