about summary refs log tree commit diff
path: root/math/s_fdiml.c
Commit message (Collapse)AuthorAgeFilesLines
* Make common fdim implementation generic.Paul E. Murphy2016-09-011-35/+0
| | | | | | | | | | | | | | The only difference is the usage of math_narrow_eval when building s_fdiml.c. This should be harmless for long double, but I did observe some code generation changes on m68k, but lack the resources to test it. Likewise, to more easily support overriding symbol generation, the aliasing macros are always conditionally defined on their absence to reduce boilerplate. I also ran builds for i486, ppc64, sparcv9, aarch64, s390x and observed no changes to s_fdim* objects.
* Simplify generic fdim implementations.Joseph Myers2016-06-141-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic fdim implementations have unnecessarily complicated code, using fpclassify to determine whether the arguments are NaNs, subtracting NaNs if so and otherwise subtracting the non-NaN arguments if not (x <= y), then using fpclassify on the result to see if it is infinite. This patch simplifies the code. Instead of handling NaNs separately, it suffices to use an unordered comparison with islessequal (x, y) to determine whether to return zero, and otherwise NaNs can go through the same subtraction as non-NaN arguments; no explicit tests for NaN are needed at all. Then, isinf instead of fpclassify can be used to determine whether to set errno (in the normal non-overflow case, only one classification will need to occur, unlike the three in the previous code, of which two occurred even if returning zero, because the result will not be infinite in the normal case). The resulting logic is essentially the same as that in the powerpc version, except that the powerpc version is missing errno setting and uses <= not islessequal, so relying on <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684>, the GCC bug that unordered comparison instructions are wrongly used on powerpc for ordered comparisons. The compiled code for fdim and fdimf on x86_64 is less than half the size of the previous code. Tested for x86_64. * math/s_fdim.c (__fdim): Use islessequal and isinf instead of fpclassify. * math/s_fdimf.c (__fdimf): Likewise. * math/s_fdiml.c (__fdiml): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Fix fdim handling of infinities (bug 15797).Joseph Myers2013-08-211-4/+4
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Fix generic fdiml.Joseph Myers2009-08-251-2/+2
|
* Fix overflow handling in fdim.Ulrich Drepper2009-08-241-4/+12
|
* Moved to csu/errno-loc.c.Ulrich Drepper2005-12-141-0/+36
|
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-36/+0
|
* 2.5-18.1Jakub Jelinek2007-07-121-0/+36