mirror of git://sourceware.org/git/glibc.git
The current implementation precision shows the following accuracy, on
one range ([-1,1]) with 10e9 uniform randomly generated numbers for
each range (first column is the accuracy in ULP, with '0' being
correctly rounded, second is the number of samples with the
corresponding precision):
* Range [-1, 1]
* FE_TONEAREST
0: 8180011860 81.80%
1: 1819865257 18.20%
2: 122883 0.00%
* FE_UPWARDA
0: 3903695744 39.04%
1: 4992324465 49.92%
2: 1096319340 10.96%
3: 7660451 0.08%
* FE_DOWNWARDA
0: 3904555484 39.05%
1: 4991970864 49.92%
2: 1095447471 10.95%
3: 8026181 0.08%
* FE_TOWARDZERO
0: 7070209165 70.70%
1: 2908447434 29.08%
2: 21343401 0.21%
The CORE-MATH implementation is correctly rounded for any rounding mode.
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) shows:
reciprocal-throughput master patched improvement
x86_64 26.4969 22.4625 15.23%
x86_64v2 26.0792 22.9822 11.88%
x86_64v3 25.6357 22.2147 13.34%
aarch64 20.2295 19.7001 2.62%
power10 10.0986 9.3846 7.07%
Latency master patched improvement
x86_64 80.2311 59.9745 25.25%
x86_64v2 79.7010 61.4066 22.95%
x86_64v3 78.2679 58.5804 25.15%
aarch64 34.3959 28.1523 18.15%
power10 23.2417 18.2694 21.39%
Checked on x86_64-linux-gnu, aarch64-linux-gnu, and
powerpc64le-linux-gnu.
Reviewed-by: DJ Delorie <dj@redhat.com>
|
||
|---|---|---|
| .. | ||
| Implies | ||
| Versions | ||
| doasin.c | ||
| e_acos.S | ||
| e_acosh.S | ||
| e_acoshl.S | ||
| e_acosl.c | ||
| e_asin.S | ||
| e_atan2.S | ||
| e_atan2l.c | ||
| e_atanh.S | ||
| e_atanhl.S | ||
| e_exp.S | ||
| e_exp2.S | ||
| e_exp2l.S | ||
| e_exp10.S | ||
| e_exp10l.S | ||
| e_exp_data.c | ||
| e_expl.S | ||
| e_fmod.S | ||
| e_fmodf.S | ||
| e_fmodl.c | ||
| e_hypot.c | ||
| e_ilogbl.S | ||
| e_log.S | ||
| e_log2.S | ||
| e_log2_data.c | ||
| e_log2l.S | ||
| e_log10.S | ||
| e_log10l.S | ||
| e_log_data.c | ||
| e_logl.S | ||
| e_pow.S | ||
| e_pow_log_data.c | ||
| e_powl.S | ||
| e_remainder.S | ||
| e_remainderf.S | ||
| e_remainderl.S | ||
| e_scalb.S | ||
| e_scalbf.S | ||
| e_scalbl.S | ||
| e_sqrt.S | ||
| e_sqrtf.S | ||
| fclrexcpt.c | ||
| fedisblxcpt.c | ||
| feenablxcpt.c | ||
| fegetenv.c | ||
| fegetexcept.c | ||
| fegetmode.c | ||
| fegetround.c | ||
| feholdexcpt.c | ||
| fesetenv.c | ||
| fesetexcept.c | ||
| fesetmode.c | ||
| fesetround.c | ||
| feupdateenv.c | ||
| fgetexcptflg.c | ||
| fraiseexcpt.c | ||
| fsetexcptflg.c | ||
| ftestexcept.c | ||
| i386-math-asm.h | ||
| libm-test-ulps | ||
| math-tests-snan.h | ||
| math-tests-trap-force.h | ||
| s_asinh.S | ||
| s_asinhl.S | ||
| s_atan.S | ||
| s_atanl.c | ||
| s_cbrt.S | ||
| s_cbrtf.S | ||
| s_cbrtl.S | ||
| s_ceil.c | ||
| s_ceilf.c | ||
| s_expm1.S | ||
| s_expm1l.S | ||
| s_f32xaddf64.c | ||
| s_f32xdivf64.c | ||
| s_f32xmulf64.c | ||
| s_f32xsubf64.c | ||
| s_fdim.c | ||
| s_finite.S | ||
| s_finitef.S | ||
| s_finitel.S | ||
| s_floor.c | ||
| s_floorf.c | ||
| s_fmax.S | ||
| s_fmaxf.S | ||
| s_fmaxl.S | ||
| s_fmin.S | ||
| s_fminf.S | ||
| s_fminl.S | ||
| s_frexp.S | ||
| s_frexpf.S | ||
| s_frexpl.S | ||
| s_isinfl.c | ||
| s_llrint.S | ||
| s_llrintf.S | ||
| s_llrintl.S | ||
| s_log1p.S | ||
| s_log1pl.S | ||
| s_logb.S | ||
| s_logbf.S | ||
| s_logbl.c | ||
| s_lrint.S | ||
| s_lrintf.S | ||
| s_lrintl.S | ||
| s_nearbyint.S | ||
| s_nearbyintf.S | ||
| s_nearbyintl.S | ||
| s_nextafterl.c | ||
| s_nexttoward.c | ||
| s_nexttowardf.c | ||
| s_remquo.S | ||
| s_remquof.S | ||
| s_remquol.S | ||
| s_rint.S | ||
| s_rintf.S | ||
| s_rintl.c | ||
| s_scalbln.c | ||
| s_scalblnf.c | ||
| s_scalblnl.c | ||
| s_scalbn.S | ||
| s_scalbnf.S | ||
| s_scalbnl.S | ||
| s_significand.S | ||
| s_significandf.S | ||
| s_significandl.c | ||
| s_trunc.c | ||
| s_truncf.c | ||
| w_exp.c | ||
| w_exp2.c | ||
| w_exp10_compat.c | ||
| w_fmod_compat.c | ||
| w_fmodf_compat.c | ||
| w_log.c | ||
| w_log2.c | ||
| w_pow.c | ||
| w_sqrt.c | ||
| w_sqrt_compat.c | ||