diff options
author | Joseph Myers <joseph@codesourcery.com> | 2016-02-18 22:24:32 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2016-02-18 22:24:32 +0000 |
commit | b9a76339be2514c700d801e179ef9b6c910eaedf (patch) | |
tree | a297f70bbf3c8a8713b11ab593b71e9acd59f245 /ChangeLog | |
parent | e2310a27bede834c7b63a8bd1d659c376b6388df (diff) | |
download | glibc-b9a76339be2514c700d801e179ef9b6c910eaedf.tar.gz |
Fix ldbl-128ibm roundl for non-default rounding modes (bug 19594).
The ldbl-128ibm implementation of roundl is only correct in
round-to-nearest mode (in other modes, there are incorrect results and
overflow exceptions in some cases). This patch reimplements it along
the lines used for floorl, ceill and truncl, using __round on the high
part, and on the low part if the high part is an integer, and then
adjusting in the cases where this is incorrect.
Tested for powerpc.
[BZ #19594]
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c (__roundl): Use __round
on high and low parts then adjust result and use
ldbl_canonicalize_int if needed.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2016-02-18 Joseph Myers <joseph@codesourcery.com> + [BZ #19594] + * sysdeps/ieee754/ldbl-128ibm/s_roundl.c (__roundl): Use __round + on high and low parts then adjust result and use + ldbl_canonicalize_int if needed. + [BZ #19593] * sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Use __trunc on high part and __floor or __ceil on low part then use |