diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-04-05 23:55:55 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-12-13 09:02:34 -0300 |
commit | c212d6397e05d0ce65405706ea0b427a418ce5ef (patch) | |
tree | 0ce65616f2207eca9aad2814f3b079de41d896e5 /sysdeps/unix/sysv/linux/grantpt.c | |
parent | aa9c28cde3966064bf2b05ca8d25c62b3e463688 (diff) | |
download | glibc-c212d6397e05d0ce65405706ea0b427a418ce5ef.tar.gz glibc-c212d6397e05d0ce65405706ea0b427a418ce5ef.tar.xz glibc-c212d6397e05d0ce65405706ea0b427a418ce5ef.zip |
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
Diffstat (limited to 'sysdeps/unix/sysv/linux/grantpt.c')
0 files changed, 0 insertions, 0 deletions