From: Ulrich Drepper Date: Mon, 2 Mar 1998 13:40:07 +0000 (+0000) Subject: (modf): Correct calculation. X-Git-Tag: cvs/before-sparc-2_0_x-branch~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4476b16cf975425010fc8ed74b5fa5d2d8a09a4c;p=thirdparty%2Fglibc.git (modf): Correct calculation. --- diff --git a/sysdeps/libm-ieee754/s_modfl.c b/sysdeps/libm-ieee754/s_modfl.c index 324fe9fde62..f97b368d6d4 100644 --- a/sysdeps/libm-ieee754/s_modfl.c +++ b/sysdeps/libm-ieee754/s_modfl.c @@ -53,7 +53,7 @@ static long double one = 1.0; SET_LDOUBLE_WORDS(*iptr,se&0x8000,0,0); /* *iptr = +-0 */ return x; } else { - i = (0xffffffff)>>j0; + i = (0x7fffffff)>>j0; if(((i0&i)|i1)==0) { /* x is integral */ *iptr = x; SET_LDOUBLE_WORDS(x,se&0x8000,0,0); /* return +-0 */ @@ -71,7 +71,7 @@ static long double one = 1.0; SET_LDOUBLE_WORDS(x,se&0x8000,0,0); /* return +-0 */ return x; } else { /* fraction part in low x */ - i = ((u_int32_t)(0xffffffff))>>(j0-20); + i = ((u_int32_t)(0x7fffffff))>>(j0-20); if((i1&i)==0) { /* x is integral */ *iptr = x; INSERT_WORDS(x,se&0x8000,0); /* return +-0 */