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 p, rr; 10 11 rr = cabsf(z); 12 p = log10f(rr); 13 rr = atan2f(cimagf(z), crealf(z)) * (float) M_IVLN10; 14 return (float complex) p + rr * I; 15 } 16