about summary refs log tree commit diff
path: root/io/mkdirat.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-04-05 17:28:48 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-12-13 09:02:34 -0300
commitaa9c28cde3966064bf2b05ca8d25c62b3e463688 (patch)
tree3d875fde6993a527785dc769b0fafacf4421cb1f /io/mkdirat.c
parentccfa865a82c648fde56864ea094f70ee1a8a944b (diff)
downloadglibc-aa9c28cde3966064bf2b05ca8d25c62b3e463688.tar.gz
glibc-aa9c28cde3966064bf2b05ca8d25c62b3e463688.tar.xz
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 'io/mkdirat.c')
0 files changed, 0 insertions, 0 deletions