diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-10-09 00:32:14 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-10-09 00:32:14 +0000 |
commit | 0e069029a8bb132876d315242054a312ae106852 (patch) | |
tree | 3afba08492052af6c50456621e0aba3323bccc29 /ChangeLog | |
parent | d0d286d32dda654f8983e8fe77bca0a2cda2051b (diff) | |
download | glibc-0e069029a8bb132876d315242054a312ae106852.tar.gz glibc-0e069029a8bb132876d315242054a312ae106852.tar.xz glibc-0e069029a8bb132876d315242054a312ae106852.zip |
Fix dbl-64 lrint for 64-bit long (bug 19095).
The dbl-64 implementation of lrint produces incorrect results for some arguments with 64-bit long because a 32-bit (unsigned) low part of the mantissa is shifted left, losing high bits in the process. This patch fixes this by casting to long int before shifting, as in lround (as this case only applies for 64-bit long, there are no issues with sign-extension). Tested for mips64 (n64). [BZ #19095] * sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Cast low part of mantissa to long int before shifting left.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 0bfe5f56a4..1ceae346df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-10-09 Joseph Myers <joseph@codesourcery.com> + + [BZ #19095] + * sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Cast low part of + mantissa to long int before shifting left. + 2015-10-08 Joseph Myers <joseph@codesourcery.com> [BZ #19094] |