Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/complex/clog10f.c')
-rw-r--r--newlib/libm/complex/clog10f.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/newlib/libm/complex/clog10f.c b/newlib/libm/complex/clog10f.c
new file mode 100644
index 000000000..124273227
--- /dev/null
+++ b/newlib/libm/complex/clog10f.c
@@ -0,0 +1,15 @@
+#include <complex.h>
+#include <math.h>
+
+float complex
+clog10f(float complex z)
+{
+ float complex w;
+ float p, rr;
+
+ rr = cabsf(z);
+ p = log10f(rr);
+ rr = atan2f(cimagf(z), crealf(z)) * (float) M_IVLN10;
+ w = p + rr * I;
+ return w;
+}