1 /* Copyright (c) 2016 Yaakov Selkowitz <yselkowi@redhat.com> */ 2 #define _DEFAULT_SOURCE 3 #include <complex.h> 4 #include <math.h> 5 6 float complex clog10f(float complex z)7clog10f(float complex z) 8 { 9 float complex w; 10 float p, rr; 11 12 rr = cabsf(z); 13 p = log10f(rr); 14 rr = atan2f(cimagf(z), crealf(z)) * (float) M_IVLN10; 15 w = p + rr * I; 16 return w; 17 } 18