Rich Felker | b69f695 | 2012-03-13 01:17:53 -0400 | [diff] [blame] | 1 | #include "libm.h" |
2 | |||||
3 | double complex cproj(double complex z) | ||||
4 | { | ||||
5 | if (isinf(creal(z)) || isinf(cimag(z))) | ||||
Szabolcs Nagy | cfbaba7 | 2012-11-13 01:31:49 +0100 | [diff] [blame] | 6 | return CMPLX(INFINITY, copysign(0.0, creal(z))); |
Rich Felker | b69f695 | 2012-03-13 01:17:53 -0400 | [diff] [blame] | 7 | return z; |
8 | } |