glibc/sysdeps/ieee754
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
..
dbl-64 math: Improve hypot performance with FMA 2021-12-13 09:02:34 -03:00
float128 powerpc64le: Avoid conflicting types for f64xfmaf128 when IFUNC is not used 2021-09-23 19:29:54 -03:00
flt-32 math: Simplify hypotf implementation 2021-12-13 09:02:30 -03:00
ldbl-64-128 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldbl-96 math: Use an improved algorithm for hypotl (ldbl-96) 2021-12-13 09:02:34 -03:00
ldbl-128 math: Use an improved algorithm for hypotl (ldbl-128) 2021-12-13 09:02:34 -03:00
ldbl-128ibm Add narrowing fma functions 2021-09-22 21:25:31 +00:00
ldbl-128ibm-compat Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
ldbl-opt Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
soft-fp Add narrowing fma functions 2021-09-22 21:25:31 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
k_standardl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libm-alias-finite.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00