glibc/sysdeps/ieee754/ldbl-128
Adhemerval Zanella c212d6397e math: Use an improved algorithm for hypotl (ldbl-128)
This implementation is based on 'An Improved Algorithm for hypot(a,b)'
by Carlos F. Borges [1] using the MyHypot3 with the following changes:

  - Handle qNaN and sNaN.
  - Tune the 'widely varying operands' to avoid spurious underflow
    due the multiplication and fix the return value for upwards
    rounding mode.
  - Handle required underflow exception for subnormal results.

The main advantage of the new algorithm is its precision.  With a
random 1e9 input pairs in the range of [LDBL_MIN, LDBL_MAX], glibc
current implementation shows around 0.05% results with an error of
1 ulp (453266 results) while the new implementation only shows
0.0001% of total (1280).

Checked on aarch64-linux-gnu and x86_64-linux-gnu.

[1] https://arxiv.org/pdf/1904.09481.pdf
2021-12-13 09:02:34 -03:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_acoshl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acosl.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_atan2l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atanhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_coshl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_exp10l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_expl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmodl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_gammal_r.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_hypotl.c math: Use an improved algorithm for hypotl (ldbl-128) 2021-12-13 09:02:34 -03:00
e_ilogbl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_j0l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_j1l.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_jnl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_lgammal_r.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_log10l.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_powl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_rem_pio2l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_remainderl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_sinhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
float128-abi.h Move __isnanf128 to libc.so 2021-03-30 14:58:19 +05:30
gamma_productl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee754.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
k_cosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
k_sincosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
k_sinl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
k_tanl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lgamma_negl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lgamma_productl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makeconfig Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
Makefile * sysdeps/ieee754/ldbl-128/Makefile: New file. 2007-03-14 17:36:18 +00:00
math_ldbl.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math-nan-payload-ldouble.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mpn2ldbl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
printf_fphex_macros.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
printf_fphex.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_asinhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_atanl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
s_cbrtl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
s_ceill.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_copysignl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_daddl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_ddivl.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_dfmal.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_dmull.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_dsqrtl.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_dsubl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_erfl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
s_expm1l.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
s_f64xaddf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_f64xdivf128.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_f64xfmaf128.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_f64xmulf128.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_f64xsqrtf128.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_f64xsubf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fabsl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_faddl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fdivl.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_ffmal.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_finitel.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_floorl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fma.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_fmal.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_fmull.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_fpclassifyl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_frexpl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fromfpl_main.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fromfpl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_fromfpxl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_fsqrtl.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_fsubl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_getpayloadl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_isinfl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_isnanl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_issignalingl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_llrintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llroundl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1pl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
s_logbl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lroundl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_modfl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nextafterl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nexttoward.c ldbl-128ibm-compat: Provide nexttoward functions 2020-02-28 08:20:02 -06:00
s_nexttowardf.c ldbl-128ibm-compat: Provide nexttoward functions 2020-02-28 08:20:02 -06:00
s_nextupl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_remquol.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_roundevenl.c Use GCC builtins for roundeven functions if desired. 2021-06-27 07:56:57 -07:00
s_roundl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalblnl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbnl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_setpayloadl_main.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_setpayloadl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_setpayloadsigl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_signbitl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_sincosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_sinl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_tanhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_tanl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_totalorderl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_totalordermagl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_truncl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_ufromfpl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
s_ufromfpxl.c Use libm_alias_ldouble for ldbl-128 functions. 2017-10-06 17:45:05 +00:00
strtold_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
t_expl.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
t_sincosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
x2y2m1l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00