2005-09-08 Brian Dessent <brian@dessent.net>

* sf_lrint.c (lrintf): Mask 'i0' correctly when extracting
        mantissa.
        * s_lrint.c: Ditto.
This commit is contained in:
Jeff Johnston 2005-09-08 21:03:54 +00:00
parent bd84404b0f
commit 32b09d754f
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-09-08 Brian Dessent <brian@dessent.net>
* sf_lrint.c (lrintf): Mask 'i0' correctly when extracting
mantissa.
* s_lrint.c: Ditto.
2005-09-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdio.h: Add prototype for viprintf.

View File

@ -83,7 +83,8 @@ TWO52[2]={
else if (j0 < (int)(8 * sizeof (long int)) - 1)
{
if (j0 >= 52)
result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52));
result = ((long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) |
(i1 << (j0 - 52));
else
{
w = TWO52[sx] + x;

View File

@ -63,7 +63,7 @@ TWO23[2]={
if (j0 < -1)
return 0;
else if (j0 >= 23)
result = (long int) i0 << (j0 - 23);
result = (long int) ((i0 & 0x7fffff) | 0x800000) << (j0 - 23);
else
{
w = TWO23[sx] + x;