aboutsummaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-08-14 17:15:06 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-08-14 17:15:06 +0000
commit739babd775d4b69525e3494cad4310742a9b360a (patch)
treefbfae14704a97c927cb31aa5c2976fe71f8ca1e1 /NEWS
parentdb7f8c8fe0575fa4c441c2f04e666a01cb06f0cc (diff)
downloadglibc-739babd775d4b69525e3494cad4310742a9b360a.tar
glibc-739babd775d4b69525e3494cad4310742a9b360a.tar.gz
glibc-739babd775d4b69525e3494cad4310742a9b360a.tar.bz2
glibc-739babd775d4b69525e3494cad4310742a9b360a.zip
Fix fma spurious underflows (bug 18824).
Various fma implementations have logic that, when computing fma (x, y, z) where z is large (so care needs taking to avoid internal overflow) but x * y is small, scale x * y up instead of down to avoid internal underflows resulting from scaling down. (In these cases, x * y is small enough that only its sign actually matters rather than the exact value.) The threshold for scaling up instead of down was correct for "if the unscaled values were multiplied, the low part of the multiplication could underflow", and the scaling was sufficient to ensure that the low part of the multiplication did not underflow (given that cases of very small x * y - less than half the least subnormal - were previously dealt with). However, the choice in the functions wasn't between scaling up or no scaling, but between scaling up and scaling down (scaling down actually being needed when x * y isn't so small compared to z and so the exact value does matter). Thus a larger threshold is needed to ensure that scaling down doesn't produce values the multiplication of whose low parts underflows. This patch increases the thresholds accordingly. Tested for x86_64, x86 and mips64 (with the MIPS version of s_fmal.c removed so that the ldbl-128 version gets tested instead of the soft-fp one). [BZ #18824] * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Increase threshold for scaling x * y up instead of down. * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Likewise. * math/auto-libm-test-in: Add more tests of fma. * math/auto-libm-test-out: Regenerated.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS2
1 files changed, 1 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5ca3de8353..088969c3b8 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Version 2.23
* The following bugs are resolved with this release:
16517, 16519, 16520, 16734, 17905, 18086, 18265, 18480, 18525, 18618,
- 18647, 18661, 18674, 18778, 18781, 18787, 18789, 18790, 18820.
+ 18647, 18661, 18674, 18778, 18781, 18787, 18789, 18790, 18820, 18824.
Version 2.22