mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-14 17:59:28 +08:00
a9ab09dfa9
newlib/ * libc/include/complex.h (clog10, clog10f): Declare. * libm/complex/Makefile.am (src): Add clog10.c. (fsrc): Add clog10f.c. (CHEWOUT_FILES): Add clog10.def. * libm/complex/Makefile.in: Regenerate. * libm/complex/clog10.c: New file. * libm/complex/clog10f.c: New file. * libm/complex/complex.tex: Add references to clog10 docs. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
16 lines
232 B
C
16 lines
232 B
C
#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;
|
|
}
|