first commit of the new libm!
[musl] / src / complex / cproj.c
diff --git a/src/complex/cproj.c b/src/complex/cproj.c
new file mode 100644 (file)
index 0000000..1cf9bb9
--- /dev/null
@@ -0,0 +1,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;
+}