glibc/sysdeps/m68k/m680x0/fpu
Adhemerval Zanella c369580814 math: Use log2p1f from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode)
and shows better performance compared to the generic log2p1f.

The code was adapted to glibc style and to use the definition of
math_config.h (to handle errno, overflow, and underflow).

Benchtest on x64_64 (Ryzen 9 5900X, gcc 14.2.1), aarch64 (Neoverse-N1,
gcc 13.3.1), and powerpc (POWER10, gcc 13.2.1):

Latency                      master        patched   improvement
x86_64                      70.1462        47.0090        32.98%
x86_64v2                    70.2513        47.6160        32.22%
x86_64v3                    60.4840        39.9443        33.96%
i686                        164.068        122.909        25.09%
aarch64                     25.9169        16.9207        34.71%
power10                     18.1261        9.8592         45.61%
powerpc                     17.2683        9.38665        45.64%

reciprocal-throughput        master        patched   improvement
x86_64                      26.2240        16.4082        37.43%
x86_64v2                    25.0911        15.7480        37.24%
x86_64v3                    20.9371        11.7264        43.99%
i686                        90.4209        95.3073        -5.40%
aarch64                     16.8537        8.9561         46.86%
power10                     12.9401        6.5555         49.34%
powerpc                     9.01763        7.54745        16.30%

The performance decrease for i686 is mostly due the use of x87 fpu,
when building with '-msse2 -mfpmath=sse:

                             master        patched   improvement
latency                     164.068        102.982        37.23%
reciprocal-throughput       89.1968        82.5117         7.49%

Signed-off-by: Alexei Sibidanov <sibid@uvic.ca>
Signed-off-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01 11:27:39 -03:00
..
branred.c
doasin.c
dosincos.c
e_acos.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_acosf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_acosl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_asin.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_asinf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_asinl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atan2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_atan2f.c
e_atan2l.c
e_atanh.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atanhf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atanhl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_cosh.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_coshf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_coshl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp2.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp2f_data.c Optimized generic expf and exp2f with wrappers 2017-09-25 10:44:39 +01:00
e_exp2f.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp2l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp10.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp10f.c New exp10f version without SVID compat wrapper 2020-06-19 12:08:47 -03:00
e_exp10l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp_data.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
e_exp.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_expf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_expl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_fmod.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_fmodf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_fmodl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_ilogb.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_ilogbf.c
e_ilogbl.c
e_log2_data.c Add new log2 implementation 2018-09-12 17:36:33 +01:00
e_log2.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log2f_data.c New generic log2f 2017-09-29 17:17:41 +01:00
e_log2f.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log2l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log10.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log10f.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log10l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log_data.c Add new log implementation 2018-09-12 17:33:30 +01:00
e_log.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_logf_data.c New generic logf 2017-09-29 11:46:46 +01:00
e_logf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_logl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_pow_log_data.c Add new pow implementation 2018-09-19 10:04:51 +01:00
e_pow.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_powf_log2_data.c New generic powf 2017-09-29 17:30:53 +01:00
e_powf.c
e_powl.c
e_rem_pio2l.c
e_remainder.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_remainderf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_remainderl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_scalb.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_scalbf.c Add a generic scalb implementation 2020-02-14 08:24:56 -06:00
e_scalbl.c Add a generic scalb implementation 2020-02-14 08:24:56 -06:00
e_sinh.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sinhf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sinhl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sqrt.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sqrtf.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sqrtl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
k_cosl.c
k_rem_pio2.c
k_sinl.c
k_tanf.c
k_tanl.c
libm-test-ulps math: Use log2p1f from CORE-MATH 2024-11-01 11:27:39 -03:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
math_err.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
math-barriers.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mathimpl.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mpa.c
mpatan2.c
mpatan.c
mpsqrt.c
mptan.c
s_atan_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_atan.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_atanf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_atanl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_ccosh_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_ceil_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_ceil.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_ceilf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_ceill.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_cexp_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_cos_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_cos.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_cosf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_cosl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_csin_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_csinh_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_expm1_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_expm1.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_expm1f.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_expm1l.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_fabs_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fabs.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_fabsf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_fabsl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_finite.c
s_finitef.c
s_finitel.c
s_floor_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_floor.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_floorf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_floorl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_fpclassifyl.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_frexp_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_frexp.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_frexpf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_frexpl.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_isinf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_isinff.c
s_isinfl.c
s_isnan.c
s_isnanf.c
s_isnanl.c
s_llrint.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_llrintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_llrintl.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_log1p.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_log1pf.c m68k: Reorganize log1p and significand implementations 2018-06-22 21:34:28 -03:00
s_log1pl.c m68k: Reorganize log1p and significand implementations 2018-06-22 21:34:28 -03:00
s_logbl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrint_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_lrint.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_lrintf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_lrintl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_modf_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_modf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_modff.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_modfl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_nearbyint_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_nearbyint.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_nearbyintf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_nearbyintl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_nextafterl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_remquo_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_remquo.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_remquof.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_remquol.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_rint_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_rint.c Use rint functions not __rint functions in glibc libm. 2018-09-14 13:10:39 +00:00
s_rintf.c Use rint functions not __rint functions in glibc libm. 2018-09-14 13:10:39 +00:00
s_rintl.c Use rint functions not __rint functions in glibc libm. 2018-09-14 13:10:39 +00:00
s_scalbln.c
s_scalblnf.c
s_scalblnl.c
s_scalbn.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_scalbnf.c
s_scalbnl.c
s_significand.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_significandf.c m68k: Reorganize log1p and significand implementations 2018-06-22 21:34:28 -03:00
s_significandl.c m68k: Reorganize log1p and significand implementations 2018-06-22 21:34:28 -03:00
s_sin_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_sin.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_sincos_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_sincos.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_sincosf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_sincosl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_sinf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_sinl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_tan_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_tan.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_tanf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_tanh_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_tanh.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_tanhf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_tanhl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_tanl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_trunc_template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_trunc.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_truncf.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
s_truncl.c Rework m68k libm functions to use declare_mgen_alias. 2017-11-30 22:39:07 +00:00
sincos32.c
sincostab.c
w_exp2.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_exp2f.c Do not wrap expf and exp2f 2017-10-02 14:38:54 +01:00
w_exp10_compat.c math: Fix i386 and m68k exp10 on static build (BZ 31775) 2024-05-21 13:44:22 -03:00
w_exp.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_expf.c Do not wrap expf and exp2f 2017-10-02 14:38:54 +01:00
w_fmod_compat.c math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) 2024-05-21 13:43:39 -03:00
w_fmodf_compat.c math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) 2024-05-21 13:43:39 -03:00
w_log2.c Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
w_log2f.c Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00
w_log.c Remove the error handling wrapper from log 2018-11-21 09:56:27 +00:00
w_logf.c Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00
w_pow.c Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
w_powf.c Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00