acadia-newlib/newlib/libm/common
Szabolcs Nagy c156098271 New expf, exp2f, logf, log2f and powf implementations
Based on code from https://github.com/ARM-software/optimized-routines/

This patch adds a highly optimized generic implementation of expf,
exp2f, logf, log2f and powf.  The new functions are not only
faster (6x for powf!), but are also smaller and more accurate.
In order to achieve this, the algorithm uses double precision
arithmetic for accuracy, avoids divisions and uses small table
lookups to minimize the polynomials.  Special cases are handled
inline to avoid the unnecessary overhead of wrapper functions and
set errno to POSIX requirements.

The new functions are added under newlib/libm/common, but the old
implementations are kept (in newlib/libm/math) for non-IEEE or
pre-C99 systems.  Targets can enable the new math code by defining
__OBSOLETE_MATH_DEFAULT to 0 in newlib/libc/include/machine/ieeefp.h,
users can override the default by defining __OBSOLETE_MATH.
Currently the new code is enabled for AArch64 and AArch32 with VFP.
Targets with a single precision FPU may still prefer the old
implementation.

libm.a size changes:
arm: -1692
arm/thumb/v7-a/nofp: -878
arm/thumb/v7-a+fp/hard: -864
arm/thumb/v7-a+fp/softfp: -908
aarch64: -1476
2017-10-13 10:58:00 +02:00
..
Makefile.am New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
Makefile.in New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
acoshl.c
acosl.c
asinhl.c
asinl.c
atan2l.c
atanhl.c
atanl.c
cbrtl.c
ceill.c
copysignl.c
coshl.c
cosl.c
erfcl.c
erfl.c
exp2l.c
expl.c
expm1l.c
fabsl.c
fdiml.c
fdlibm.h * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
floorl.c
fmal.c
fmaxl.c
fminl.c
fmodl.c
frexpl.c
hypotl.c * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
ilogbl.c
isgreater.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
ldexpl.c
lgammal.c
llrintl.c
llroundl.c
local.h
log1pl.c
log2l.c 2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com> 2014-12-15 20:50:23 +00:00
log10l.c
logbl.c 2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com> 2014-12-15 20:50:23 +00:00
logl.c
lrintl.c
lroundl.c
math_config.h New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
math_errf.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
modfl.c 2013-11-19 Joel Sherrill <joel.sherrill@oarcorp.com> 2013-11-19 17:28:04 +00:00
nanl.c
nearbyintl.c
nextafterl.c
nexttoward.c 2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com> 2014-12-15 20:50:23 +00:00
nexttowardf.c 2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com> 2014-12-15 20:50:23 +00:00
nexttowardl.c 2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com> 2014-12-15 20:50:23 +00:00
powl.c
remainderl.c
remquol.c
rintl.c
roundl.c
s_cbrt.c
s_copysign.c
s_exp10.c Use makedoc output files which are generated but aren't included 2015-06-24 12:23:55 +01:00
s_expm1.c
s_fdim.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_finite.c
s_fma.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_fmax.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_fmin.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_fpclassify.c
s_ilogb.c
s_infinity.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_isinf.c math: fix isinf/isnan on SPU after move to math.h 2016-04-07 10:18:22 -05:00
s_isinfd.c
s_isnan.c math: fix isinf/isnan on SPU after move to math.h 2016-04-07 10:18:22 -05:00
s_isnand.c math: update isinf/isnan function comments after move to math.h 2016-04-05 08:49:44 -05:00
s_lib_ver.c
s_llrint.c 2010-08-03 Craig Howland <howland@LGSInnovations.com> 2010-08-03 18:21:20 +00:00
s_llround.c 2010-08-03 Craig Howland <howland@LGSInnovations.com> 2010-08-03 18:21:20 +00:00
s_log1p.c
s_log2.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_logb.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_lrint.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_lround.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_matherr.c
s_modf.c
s_nan.c Fix SYNOPSIS prototypes without marked up parameter names 2015-06-23 17:30:22 +01:00
s_nearbyint.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_nextafter.c
s_pow10.c Use makedoc output files which are generated but aren't included 2015-06-24 12:23:55 +01:00
s_remquo.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_rint.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_round.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_scalbln.c
s_scalbn.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_signbit.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
s_trunc.c Consistently use an em-dash in math functions. 2015-11-02 16:43:22 -05:00
scalblnl.c
scalbnl.c
sf_cbrt.c
sf_copysign.c
sf_exp.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_exp2.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_exp2_data.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_exp10.c
sf_expm1.c
sf_fdim.c
sf_finite.c
sf_fma.c
sf_fmax.c
sf_fmin.c
sf_fpclassify.c
sf_ilogb.c
sf_infinity.c
sf_isinf.c math: update isinf/isnan function comments after move to math.h 2016-04-05 08:49:44 -05:00
sf_isinff.c
sf_isnan.c math: update isinf/isnan function comments after move to math.h 2016-04-05 08:49:44 -05:00
sf_isnanf.c
sf_llrint.c * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit casts 2010-10-08 15:24:56 +00:00
sf_llround.c
sf_log.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_log1p.c
sf_log2.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_log2_data.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_log_data.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_logb.c
sf_lrint.c
sf_lround.c
sf_modf.c
sf_nan.c 2014-03-21 Maciej W. Rozycki <macro@codesourcery.com> 2014-03-21 21:27:29 +00:00
sf_nearbyint.c
sf_nextafter.c
sf_pow.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_pow10.c
sf_pow_log2_data.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
sf_remquo.c
sf_rint.c
sf_round.c Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00
sf_scalbln.c
sf_scalbn.c
sf_trunc.c
sinhl.c
sinl.c
sl_finite.c finitel: Use correct GCC builtin 2016-03-26 20:29:20 +01:00
sqrtl.c * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
tanhl.c
tanl.c
tgammal.c
truncl.c