projects
/
libm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
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
+++ b/
src/cmath/cprojf.c
@@ -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;
+}