about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-96/s_fmal.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix fma spurious underflows (bug 18824).Joseph Myers2015-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Force eval for fma implementationsRichard Henderson2014-08-011-5/+6
|
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-3/+3
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Fix fma underflows with small x * y (bug 14793).Joseph Myers2012-11-061-18/+27
|
* Fix fma overflow results outside round-to-nearest mode (bug 14797).Joseph Myers2012-11-041-4/+6
|
* Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).Joseph Myers2012-11-031-2/+16
|
* Fix fma (a, b, c) for small a * b (bugs 14784, 14785).Joseph Myers2012-11-011-4/+32
|
* Fix fma underflow exceptions in after-rounding edge cases.Joseph Myers2012-10-311-0/+12
|
* Fix fma missing underflows and bad results for some subnormal results (bugs ↵Joseph Myers2012-10-301-14/+8
| | | | 14152, 14783).
* Fix sign of inexact zero return from fma (bug 14645).Joseph Myers2012-10-011-0/+5
|
* Fix sign of exact zero return from fma (bug 14638).Joseph Myers2012-09-291-0/+5
|
* Ensure additions are not scheduled after fetestexcept in fmaf and fmal.Joseph Myers2012-06-011-1/+4
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Implement fmal, some fma bugfixesJakub Jelinek2010-10-151-0/+221