mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-15 09:30:06 +00:00
c212d6397e
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 |
||
---|---|---|
.. | ||
dbl-64 | ||
float128 | ||
flt-32 | ||
ldbl-64-128 | ||
ldbl-96 | ||
ldbl-128 | ||
ldbl-128ibm | ||
ldbl-128ibm-compat | ||
ldbl-opt | ||
soft-fp | ||
ieee754.h | ||
k_standard.c | ||
k_standardf.c | ||
k_standardl.c | ||
libm-alias-finite.h | ||
Makefile | ||
s_lib_version.c | ||
s_matherr.c | ||
s_signgam.c |