extend cmath (some of the functions are dummy)
[libm] / src / cmath / cprojf.c
diff --git a/src/cmath/cprojf.c b/src/cmath/cprojf.c
new file mode 100644 (file)
index 0000000..7112974
--- /dev/null
@@ -0,0 +1,8 @@
+#include "libm.h"
+
+float complex cprojf(float complex z)
+{
+       if (isinf(crealf(z)) || isinf(cimagf(z)))
+               return cpackf(INFINITY, copysignf(0.0, crealf(z)));
+       return z;
+}