]> sourceware.org Git - glibc.git/commit
Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156).
authorJoseph Myers <joseph@codesourcery.com>
Fri, 27 May 2016 13:59:24 +0000 (13:59 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 27 May 2016 13:59:24 +0000 (13:59 +0000)
commitbba14195895fa612a8ef484e9856127a1be4f80f
tree051ea27d98def6f54e13367559ffc7c0d7f83a24
parent98c9c9d9ca6c1eb8e30fe449b1e1121b8c498715
Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156).

The ldbl-128ibm implementations of ceill, floorl, roundl, truncl,
rintl and nearbyintl wrongly return an sNaN when given an sNaN
argument.  This patch fixes them to add such an argument to itself to
turn it into a quiet NaN.  (The code structure means this "else" case
applies to any argument which is zero or not finite; it's OK to do
this in all such cases.)

Tested for powerpc.

[BZ #20156]
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Add high part
to itself when zero or not finite.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c (__floorl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c (__rintl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c (__roundl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Likewise.
ChangeLog
sysdeps/ieee754/ldbl-128ibm/s_ceill.c
sysdeps/ieee754/ldbl-128ibm/s_floorl.c
sysdeps/ieee754/ldbl-128ibm/s_rintl.c
sysdeps/ieee754/ldbl-128ibm/s_roundl.c
sysdeps/ieee754/ldbl-128ibm/s_truncl.c
This page took 0.044013 seconds and 5 git commands to generate.