diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-04-05 17:28:48 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-12-13 09:02:34 -0300 |
commit | aa9c28cde3966064bf2b05ca8d25c62b3e463688 (patch) | |
tree | 3d875fde6993a527785dc769b0fafacf4421cb1f /sysdeps/unix/sysv/linux/sparc/sysdep.h | |
parent | ccfa865a82c648fde56864ea094f70ee1a8a944b (diff) | |
download | glibc-aa9c28cde3966064bf2b05ca8d25c62b3e463688.tar glibc-aa9c28cde3966064bf2b05ca8d25c62b3e463688.tar.gz glibc-aa9c28cde3966064bf2b05ca8d25c62b3e463688.tar.bz2 glibc-aa9c28cde3966064bf2b05ca8d25c62b3e463688.zip |
math: Use an improved algorithm for hypotl (ldbl-96)
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 1e8 input pairs in the range of [LDBL_MIN, LDBL_MAX], glibc
current implementation shows around 0.02% results with an error of
1 ulp (23158 results) while the new implementation only shows
0.0001% of total (111).
[1] https://arxiv.org/pdf/1904.09481.pdf
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sysdep.h')
0 files changed, 0 insertions, 0 deletions