glibc/sysdeps/i386/fpu
Adhemerval Zanella 79b70fc09f math: Use atanh from CORE-MATH
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>
2025-10-27 09:34:04 -03:00
..
Implies
Versions
doasin.c
e_acos.S
e_acosh.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
e_acoshl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
e_acosl.c
e_asin.S
e_atan2.S
e_atan2l.c
e_atanh.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
e_atanhl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
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 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
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 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
e_pow_log_data.c
e_powl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
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 x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fedisblxcpt.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
feenablxcpt.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fegetenv.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fegetexcept.c x86: Remove obsolete "*&" GCC asm memory operand workaround 2025-09-22 17:33:25 +02:00
fegetmode.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fegetround.c x86: Remove obsolete "*&" GCC asm memory operand workaround 2025-09-22 17:33:25 +02:00
feholdexcpt.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fesetenv.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fesetexcept.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fesetmode.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fesetround.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
feupdateenv.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fgetexcptflg.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
fraiseexcpt.c x86: Remove obsolete "*&" GCC asm memory operand workaround 2025-09-22 17:33:25 +02:00
fsetexcptflg.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
ftestexcept.c x86: Use "%v" to emit VEX encoded instructions for AVX targets 2025-09-22 17:33:25 +02:00
i386-math-asm.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm-test-ulps math: Use atanh from CORE-MATH 2025-10-27 09:34:04 -03:00
math-tests-snan.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-trap-force.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_asinh.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_asinhl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_atan.S
s_atanl.c
s_cbrt.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_cbrtf.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_cbrtl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_ceil.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_ceilf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_expm1.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_expm1l.S
s_f32xaddf64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_f32xdivf64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_f32xmulf64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_f32xsubf64.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fdim.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_finite.S
s_finitef.S
s_finitel.S
s_floor.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_floorf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fmax.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fmaxf.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fmaxl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fmin.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fminf.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_fminl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_frexp.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_frexpf.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_frexpl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_isinfl.c
s_llrint.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_llrintf.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_llrintl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_log1p.S
s_log1pl.S
s_logb.S
s_logbf.S
s_logbl.c
s_lrint.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_lrintf.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_lrintl.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
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 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_truncf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
w_exp.c
w_exp2.c
w_exp10_compat.c math: Fix i386 and m68k exp10 on static build (BZ 31775) 2024-05-21 13:44:22 -03: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_log.c
w_log2.c
w_pow.c
w_sqrt.c
w_sqrt_compat.c