first commit of the new libm!
authorRich Felker <dalias@aerifal.cx>
Tue, 13 Mar 2012 05:17:53 +0000 (01:17 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 13 Mar 2012 05:17:53 +0000 (01:17 -0400)
commitb69f695acedd4ce2798ef9ea28d834ceccc789bd
treeeafd98b9b75160210f3295ac074d699f863d958e
parentd46cf2e14cc4df7cc75e77d7009fcb6df1f48a33
first commit of the new libm!

thanks to the hard work of Szabolcs Nagy (nsz), identifying the best
(from correctness and license standpoint) implementations from freebsd
and openbsd and cleaning them up! musl should now fully support c99
float and long double math functions, and has near-complete complex
math support. tgmath should also work (fully on gcc-compatible
compilers, and mostly on any c99 compiler).

based largely on commit 0376d44a890fea261506f1fc63833e7a686dca19 from
nsz's libm git repo, with some additions (dummy versions of a few
missing long double complex functions, etc.) by me.

various cleanups still need to be made, including re-adding (if
they're correct) some asm functions that were dropped.
402 files changed:
include/complex.h [new file with mode: 0644]
include/math.h
include/tgmath.h [new file with mode: 0644]
src/complex/__cexp.c [new file with mode: 0644]
src/complex/__cexpf.c [new file with mode: 0644]
src/complex/cabs.c [new file with mode: 0644]
src/complex/cabsf.c [new file with mode: 0644]
src/complex/cabsl.c [new file with mode: 0644]
src/complex/cacos.c [new file with mode: 0644]
src/complex/cacosf.c [new file with mode: 0644]
src/complex/cacosh.c [new file with mode: 0644]
src/complex/cacoshf.c [new file with mode: 0644]
src/complex/cacoshl.c [new file with mode: 0644]
src/complex/cacosl.c [new file with mode: 0644]
src/complex/carg.c [new file with mode: 0644]
src/complex/cargf.c [new file with mode: 0644]
src/complex/cargl.c [new file with mode: 0644]
src/complex/casin.c [new file with mode: 0644]
src/complex/casinf.c [new file with mode: 0644]
src/complex/casinh.c [new file with mode: 0644]
src/complex/casinhf.c [new file with mode: 0644]
src/complex/casinhl.c [new file with mode: 0644]
src/complex/casinl.c [new file with mode: 0644]
src/complex/catan.c [new file with mode: 0644]
src/complex/catanf.c [new file with mode: 0644]
src/complex/catanh.c [new file with mode: 0644]
src/complex/catanhf.c [new file with mode: 0644]
src/complex/catanhl.c [new file with mode: 0644]
src/complex/catanl.c [new file with mode: 0644]
src/complex/ccos.c [new file with mode: 0644]
src/complex/ccosf.c [new file with mode: 0644]
src/complex/ccosh.c [new file with mode: 0644]
src/complex/ccoshf.c [new file with mode: 0644]
src/complex/ccoshl.c [new file with mode: 0644]
src/complex/ccosl.c [new file with mode: 0644]
src/complex/cexp.c [new file with mode: 0644]
src/complex/cexpf.c [new file with mode: 0644]
src/complex/cexpl.c [new file with mode: 0644]
src/complex/cimag.c [new file with mode: 0644]
src/complex/cimagf.c [new file with mode: 0644]
src/complex/cimagl.c [new file with mode: 0644]
src/complex/clog.c [new file with mode: 0644]
src/complex/clogf.c [new file with mode: 0644]
src/complex/clogl.c [new file with mode: 0644]
src/complex/conj.c [new file with mode: 0644]
src/complex/conjf.c [new file with mode: 0644]
src/complex/conjl.c [new file with mode: 0644]
src/complex/cpow.c [new file with mode: 0644]
src/complex/cpowf.c [new file with mode: 0644]
src/complex/cpowl.c [new file with mode: 0644]
src/complex/cproj.c [new file with mode: 0644]
src/complex/cprojf.c [new file with mode: 0644]
src/complex/cprojl.c [new file with mode: 0644]
src/complex/creal.c [new file with mode: 0644]
src/complex/crealf.c [new file with mode: 0644]
src/complex/creall.c [new file with mode: 0644]
src/complex/csin.c [new file with mode: 0644]
src/complex/csinf.c [new file with mode: 0644]
src/complex/csinh.c [new file with mode: 0644]
src/complex/csinhf.c [new file with mode: 0644]
src/complex/csinhl.c [new file with mode: 0644]
src/complex/csinl.c [new file with mode: 0644]
src/complex/csqrt.c [new file with mode: 0644]
src/complex/csqrtf.c [new file with mode: 0644]
src/complex/csqrtl.c [new file with mode: 0644]
src/complex/ctan.c [new file with mode: 0644]
src/complex/ctanf.c [new file with mode: 0644]
src/complex/ctanh.c [new file with mode: 0644]
src/complex/ctanhf.c [new file with mode: 0644]
src/complex/ctanhl.c [new file with mode: 0644]
src/complex/ctanl.c [new file with mode: 0644]
src/internal/libm.h [new file with mode: 0644]
src/internal/longdbl.h [new file with mode: 0644]
src/math/__cos.c [new file with mode: 0644]
src/math/__cosdf.c [new file with mode: 0644]
src/math/__cosl.c [new file with mode: 0644]
src/math/__expo2.c [new file with mode: 0644]
src/math/__expo2f.c [new file with mode: 0644]
src/math/__fpclassify.c
src/math/__fpclassifyf.c
src/math/__fpclassifyl.c
src/math/__invtrigl.c [new file with mode: 0644]
src/math/__invtrigl.h [new file with mode: 0644]
src/math/__log1p.h [new file with mode: 0644]
src/math/__log1pf.h [new file with mode: 0644]
src/math/__polevll.c [new file with mode: 0644]
src/math/__rem_pio2.c [new file with mode: 0644]
src/math/__rem_pio2_large.c [new file with mode: 0644]
src/math/__rem_pio2f.c [new file with mode: 0644]
src/math/__rem_pio2l.h [new file with mode: 0644]
src/math/__signbit.c [new file with mode: 0644]
src/math/__signbitf.c [new file with mode: 0644]
src/math/__signbitl.c [new file with mode: 0644]
src/math/__sin.c [new file with mode: 0644]
src/math/__sindf.c [new file with mode: 0644]
src/math/__sinl.c [new file with mode: 0644]
src/math/__tan.c [new file with mode: 0644]
src/math/__tandf.c [new file with mode: 0644]
src/math/__tanl.c [new file with mode: 0644]
src/math/acos.c [new file with mode: 0644]
src/math/acosf.c [new file with mode: 0644]
src/math/acosh.c [new file with mode: 0644]
src/math/acoshf.c [new file with mode: 0644]
src/math/acoshl.c [new file with mode: 0644]
src/math/acosl.c [new file with mode: 0644]
src/math/asin.c [new file with mode: 0644]
src/math/asinf.c [new file with mode: 0644]
src/math/asinh.c [new file with mode: 0644]
src/math/asinhf.c [new file with mode: 0644]
src/math/asinhl.c [new file with mode: 0644]
src/math/asinl.c [new file with mode: 0644]
src/math/atan.c [new file with mode: 0644]
src/math/atan2.c [new file with mode: 0644]
src/math/atan2f.c [new file with mode: 0644]
src/math/atan2l.c [new file with mode: 0644]
src/math/atanf.c [new file with mode: 0644]
src/math/atanh.c [new file with mode: 0644]
src/math/atanhf.c [new file with mode: 0644]
src/math/atanhl.c [new file with mode: 0644]
src/math/atanl.c [new file with mode: 0644]
src/math/cbrt.c [new file with mode: 0644]
src/math/cbrtf.c [new file with mode: 0644]
src/math/cbrtl.c [new file with mode: 0644]
src/math/ceil.c [new file with mode: 0644]
src/math/ceilf.c [new file with mode: 0644]
src/math/ceill.c [new file with mode: 0644]
src/math/copysign.c [new file with mode: 0644]
src/math/copysignf.c [new file with mode: 0644]
src/math/copysignl.c [new file with mode: 0644]
src/math/cos.c [new file with mode: 0644]
src/math/cosf.c [new file with mode: 0644]
src/math/cosh.c [new file with mode: 0644]
src/math/coshf.c [new file with mode: 0644]
src/math/coshl.c [new file with mode: 0644]
src/math/cosl.c [new file with mode: 0644]
src/math/e_acos.c [deleted file]
src/math/e_acosf.c [deleted file]
src/math/e_acosh.c [deleted file]
src/math/e_acoshf.c [deleted file]
src/math/e_asin.c [deleted file]
src/math/e_asinf.c [deleted file]
src/math/e_atan2.c [deleted file]
src/math/e_atan2f.c [deleted file]
src/math/e_atanh.c [deleted file]
src/math/e_atanhf.c [deleted file]
src/math/e_cosh.c [deleted file]
src/math/e_coshf.c [deleted file]
src/math/e_exp.c [deleted file]
src/math/e_expf.c [deleted file]
src/math/e_fmod.c [deleted file]
src/math/e_fmodf.c [deleted file]
src/math/e_hypot.c [deleted file]
src/math/e_hypotf.c [deleted file]
src/math/e_log.c [deleted file]
src/math/e_log10.c [deleted file]
src/math/e_log10f.c [deleted file]
src/math/e_logf.c [deleted file]
src/math/e_pow.c [deleted file]
src/math/e_powf.c [deleted file]
src/math/e_rem_pio2.c [deleted file]
src/math/e_rem_pio2f.c [deleted file]
src/math/e_remainder.c [deleted file]
src/math/e_remainderf.c [deleted file]
src/math/e_scalb.c [deleted file]
src/math/e_scalbf.c [deleted file]
src/math/e_sinh.c [deleted file]
src/math/e_sinhf.c [deleted file]
src/math/e_sqrt.c [deleted file]
src/math/e_sqrtf.c [deleted file]
src/math/erf.c [new file with mode: 0644]
src/math/erff.c [new file with mode: 0644]
src/math/erfl.c [new file with mode: 0644]
src/math/exp.c [new file with mode: 0644]
src/math/exp2.c [new file with mode: 0644]
src/math/exp2f.c [new file with mode: 0644]
src/math/exp2l.c [new file with mode: 0644]
src/math/expf.c [new file with mode: 0644]
src/math/expl.c [new file with mode: 0644]
src/math/expm1.c [new file with mode: 0644]
src/math/expm1f.c [new file with mode: 0644]
src/math/expm1l.c [new file with mode: 0644]
src/math/fabs.c [new file with mode: 0644]
src/math/fabsf.c [new file with mode: 0644]
src/math/fabsl.c [new file with mode: 0644]
src/math/fdim.c [new file with mode: 0644]
src/math/fdimf.c [new file with mode: 0644]
src/math/fdiml.c [new file with mode: 0644]
src/math/floor.c [new file with mode: 0644]
src/math/floorf.c [new file with mode: 0644]
src/math/floorl.c [new file with mode: 0644]
src/math/fma.c [new file with mode: 0644]
src/math/fmaf.c [new file with mode: 0644]
src/math/fmal.c [new file with mode: 0644]
src/math/fmax.c [new file with mode: 0644]
src/math/fmaxf.c [new file with mode: 0644]
src/math/fmaxl.c [new file with mode: 0644]
src/math/fmin.c [new file with mode: 0644]
src/math/fminf.c [new file with mode: 0644]
src/math/fminl.c [new file with mode: 0644]
src/math/fmod.c [new file with mode: 0644]
src/math/fmodf.c [new file with mode: 0644]
src/math/fmodl.c [new file with mode: 0644]
src/math/frexp.c [new file with mode: 0644]
src/math/frexpf.c [new file with mode: 0644]
src/math/frexpl.c [new file with mode: 0644]
src/math/hypot.c [new file with mode: 0644]
src/math/hypotf.c [new file with mode: 0644]
src/math/hypotl.c [new file with mode: 0644]
src/math/i386/e_exp.s [deleted file]
src/math/i386/e_expf.s [deleted file]
src/math/i386/e_log.s [deleted file]
src/math/i386/e_log10.s [deleted file]
src/math/i386/e_log10f.s [deleted file]
src/math/i386/e_logf.s [deleted file]
src/math/i386/e_remainder.s [deleted file]
src/math/i386/e_remainderf.s [deleted file]
src/math/i386/e_sqrt.s [deleted file]
src/math/i386/e_sqrtf.s [deleted file]
src/math/i386/s_ceil.s [deleted file]
src/math/i386/s_ceilf.s [deleted file]
src/math/i386/s_fabs.s [deleted file]
src/math/i386/s_fabsf.s [deleted file]
src/math/i386/s_floor.s [deleted file]
src/math/i386/s_floorf.s [deleted file]
src/math/i386/s_ldexp.s [deleted file]
src/math/i386/s_ldexpf.s [deleted file]
src/math/i386/s_rint.s [deleted file]
src/math/i386/s_rintf.s [deleted file]
src/math/i386/s_scalbln.s [deleted file]
src/math/i386/s_scalblnf.s [deleted file]
src/math/i386/s_trunc.s [deleted file]
src/math/i386/s_truncf.s [deleted file]
src/math/i386/sqrt.s [new file with mode: 0644]
src/math/i386/sqrtf.s [new file with mode: 0644]
src/math/i386/sqrtl.s [new file with mode: 0644]
src/math/ilogb.c [new file with mode: 0644]
src/math/ilogbf.c [new file with mode: 0644]
src/math/ilogbl.c [new file with mode: 0644]
src/math/j0.c [new file with mode: 0644]
src/math/j0f.c [new file with mode: 0644]
src/math/j1.c [new file with mode: 0644]
src/math/j1f.c [new file with mode: 0644]
src/math/jn.c [new file with mode: 0644]
src/math/jnf.c [new file with mode: 0644]
src/math/k_cos.c [deleted file]
src/math/k_cosf.c [deleted file]
src/math/k_rem_pio2.c [deleted file]
src/math/k_rem_pio2f.c [deleted file]
src/math/k_sin.c [deleted file]
src/math/k_sinf.c [deleted file]
src/math/k_tan.c [deleted file]
src/math/k_tanf.c [deleted file]
src/math/ldexp.c [new file with mode: 0644]
src/math/ldexpf.c [new file with mode: 0644]
src/math/ldexpl.c [new file with mode: 0644]
src/math/lgamma.c [new file with mode: 0644]
src/math/lgamma_r.c [new file with mode: 0644]
src/math/lgammaf.c [new file with mode: 0644]
src/math/lgammaf_r.c [new file with mode: 0644]
src/math/lgammal.c [new file with mode: 0644]
src/math/llrint.c [new file with mode: 0644]
src/math/llrintf.c [new file with mode: 0644]
src/math/llrintl.c [new file with mode: 0644]
src/math/llround.c [new file with mode: 0644]
src/math/llroundf.c [new file with mode: 0644]
src/math/llroundl.c [new file with mode: 0644]
src/math/log.c [new file with mode: 0644]
src/math/log10.c [new file with mode: 0644]
src/math/log10f.c [new file with mode: 0644]
src/math/log10l.c [new file with mode: 0644]
src/math/log1p.c [new file with mode: 0644]
src/math/log1pf.c [new file with mode: 0644]
src/math/log1pl.c [new file with mode: 0644]
src/math/log2.c [new file with mode: 0644]
src/math/log2f.c [new file with mode: 0644]
src/math/log2l.c [new file with mode: 0644]
src/math/logb.c [new file with mode: 0644]
src/math/logbf.c [new file with mode: 0644]
src/math/logbl.c [new file with mode: 0644]
src/math/logf.c [new file with mode: 0644]
src/math/logl.c [new file with mode: 0644]
src/math/lrint.c [new file with mode: 0644]
src/math/lrintf.c [new file with mode: 0644]
src/math/lrintl.c [new file with mode: 0644]
src/math/lround.c [new file with mode: 0644]
src/math/lroundf.c [new file with mode: 0644]
src/math/lroundl.c [new file with mode: 0644]
src/math/math_private.h [deleted file]
src/math/modf.c [new file with mode: 0644]
src/math/modff.c [new file with mode: 0644]
src/math/modfl.c [new file with mode: 0644]
src/math/nearbyint.c [new file with mode: 0644]
src/math/nearbyintf.c [new file with mode: 0644]
src/math/nearbyintl.c [new file with mode: 0644]
src/math/nextafter.c [new file with mode: 0644]
src/math/nextafterf.c [new file with mode: 0644]
src/math/nextafterl.c [new file with mode: 0644]
src/math/nexttoward.c [new file with mode: 0644]
src/math/nexttowardf.c [new file with mode: 0644]
src/math/nexttowardl.c [new file with mode: 0644]
src/math/pow.c [new file with mode: 0644]
src/math/powf.c [new file with mode: 0644]
src/math/powl.c [new file with mode: 0644]
src/math/remainder.c [new file with mode: 0644]
src/math/remainderf.c [new file with mode: 0644]
src/math/remainderl.c [new file with mode: 0644]
src/math/remquo.c [new file with mode: 0644]
src/math/remquof.c [new file with mode: 0644]
src/math/remquol.c [new file with mode: 0644]
src/math/rint.c [new file with mode: 0644]
src/math/rintf.c [new file with mode: 0644]
src/math/rintl.c [new file with mode: 0644]
src/math/round.c [new file with mode: 0644]
src/math/roundf.c [new file with mode: 0644]
src/math/roundl.c [new file with mode: 0644]
src/math/s_asinh.c [deleted file]
src/math/s_asinhf.c [deleted file]
src/math/s_atan.c [deleted file]
src/math/s_atanf.c [deleted file]
src/math/s_cbrt.c [deleted file]
src/math/s_cbrtf.c [deleted file]
src/math/s_ceil.c [deleted file]
src/math/s_ceilf.c [deleted file]
src/math/s_copysign.c [deleted file]
src/math/s_copysignf.c [deleted file]
src/math/s_cos.c [deleted file]
src/math/s_cosf.c [deleted file]
src/math/s_erf.c [deleted file]
src/math/s_erff.c [deleted file]
src/math/s_expm1.c [deleted file]
src/math/s_expm1f.c [deleted file]
src/math/s_fabs.c [deleted file]
src/math/s_fabsf.c [deleted file]
src/math/s_floor.c [deleted file]
src/math/s_floorf.c [deleted file]
src/math/s_ilogb.c [deleted file]
src/math/s_ilogbf.c [deleted file]
src/math/s_ldexp.c [deleted file]
src/math/s_ldexpf.c [deleted file]
src/math/s_llrint.c [deleted file]
src/math/s_log1p.c [deleted file]
src/math/s_log1pf.c [deleted file]
src/math/s_logb.c [deleted file]
src/math/s_logbf.c [deleted file]
src/math/s_lrint.c [deleted file]
src/math/s_lrintf.c [deleted file]
src/math/s_modf.c [deleted file]
src/math/s_modff.c [deleted file]
src/math/s_nextafter.c [deleted file]
src/math/s_nextafterf.c [deleted file]
src/math/s_remquo.c [deleted file]
src/math/s_remquof.c [deleted file]
src/math/s_rint.c [deleted file]
src/math/s_rintf.c [deleted file]
src/math/s_round.c [deleted file]
src/math/s_roundf.c [deleted file]
src/math/s_scalbln.c [deleted file]
src/math/s_scalblnf.c [deleted file]
src/math/s_sin.c [deleted file]
src/math/s_sinf.c [deleted file]
src/math/s_tan.c [deleted file]
src/math/s_tanf.c [deleted file]
src/math/s_tanh.c [deleted file]
src/math/s_tanhf.c [deleted file]
src/math/s_trunc.c [deleted file]
src/math/s_truncf.c [deleted file]
src/math/scalb.c [new file with mode: 0644]
src/math/scalbf.c [new file with mode: 0644]
src/math/scalbln.c [new file with mode: 0644]
src/math/scalblnf.c [new file with mode: 0644]
src/math/scalblnl.c [new file with mode: 0644]
src/math/scalbn.c [new file with mode: 0644]
src/math/scalbnf.c [new file with mode: 0644]
src/math/scalbnl.c [new file with mode: 0644]
src/math/signgam.c [new file with mode: 0644]
src/math/sin.c [new file with mode: 0644]
src/math/sinf.c [new file with mode: 0644]
src/math/sinh.c [new file with mode: 0644]
src/math/sinhf.c [new file with mode: 0644]
src/math/sinhl.c [new file with mode: 0644]
src/math/sinl.c [new file with mode: 0644]
src/math/sqrt.c [new file with mode: 0644]
src/math/sqrtf.c [new file with mode: 0644]
src/math/sqrtl.c [new file with mode: 0644]
src/math/tan.c [new file with mode: 0644]
src/math/tanf.c [new file with mode: 0644]
src/math/tanh.c [new file with mode: 0644]
src/math/tanhf.c [new file with mode: 0644]
src/math/tanhl.c [new file with mode: 0644]
src/math/tanl.c [new file with mode: 0644]
src/math/tgammal.c [new file with mode: 0644]
src/math/trunc.c [new file with mode: 0644]
src/math/truncf.c [new file with mode: 0644]
src/math/truncl.c [new file with mode: 0644]
src/math/x86_64/e_sqrt.s [deleted file]
src/math/x86_64/e_sqrtf.s [deleted file]
src/math/x86_64/sqrt.s [new file with mode: 0644]
src/math/x86_64/sqrtf.s [new file with mode: 0644]
src/math/x86_64/sqrtl.s [new file with mode: 0644]
src/stdlib/frexp.c [deleted file]
src/stdlib/frexpf.c [deleted file]
src/stdlib/frexpl.c [deleted file]