diff options
Diffstat (limited to 'libjava/java/lang/e_fmod.c')
-rw-r--r-- | libjava/java/lang/e_fmod.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libjava/java/lang/e_fmod.c b/libjava/java/lang/e_fmod.c index f9739ee..1cf0990 100644 --- a/libjava/java/lang/e_fmod.c +++ b/libjava/java/lang/e_fmod.c @@ -6,12 +6,12 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -/* +/* * __ieee754_fmod(x,y) * Return x mod y in exact arithmetic * Method: shift and subtract @@ -34,8 +34,8 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; double x,y ; #endif { - __int32_t n,hx,hy,hz,ix,iy,sx,i; - __uint32_t lx,ly,lz; + int32_t n,hx,hy,hz,ix,iy,sx,i; + uint32_t lx,ly,lz; EXTRACT_WORDS(hx,lx,x); EXTRACT_WORDS(hy,ly,y); @@ -49,8 +49,8 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; return (x*y)/(x*y); if(hx<=hy) { if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */ - if(lx==ly) - return Zero[(__uint32_t)sx>>31]; /* |x|=|y| return x*0*/ + if(lx==ly) + return Zero[(uint32_t)sx>>31]; /* |x|=|y| return x*0*/ } /* determine ix = ilogb(x) */ @@ -72,7 +72,7 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; } else iy = (hy>>20)-1023; /* set up {hx,lx}, {hy,ly} and align y to x */ - if(ix >= -1022) + if(ix >= -1022) hx = 0x00100000|(0x000fffff&hx); else { /* subnormal x, shift x to normal */ n = -1022-ix; @@ -84,7 +84,7 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; lx = 0; } } - if(iy >= -1022) + if(iy >= -1022) hy = 0x00100000|(0x000fffff&hy); else { /* subnormal y, shift y to normal */ n = -1022-iy; @@ -104,7 +104,7 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;} else { if((hz|lz)==0) /* return sign(x)*0 */ - return Zero[(__uint32_t)sx>>31]; + return Zero[(uint32_t)sx>>31]; hx = hz+hz+(lz>>31); lx = lz+lz; } } @@ -113,7 +113,7 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; /* convert back to floating value and restore the sign */ if((hx|lx)==0) /* return sign(x)*0 */ - return Zero[(__uint32_t)sx>>31]; + return Zero[(uint32_t)sx>>31]; while(hx<0x00100000) { /* normalize x */ hx = hx+hx+(lx>>31); lx = lx+lx; iy -= 1; @@ -124,7 +124,7 @@ static double one = 1.0, Zero[] = {0.0, -0.0,}; } else { /* subnormal output */ n = -1022 - iy; if(n<=20) { - lx = (lx>>n)|((__uint32_t)hx<<(32-n)); + lx = (lx>>n)|((uint32_t)hx<<(32-n)); hx >>= n; } else if (n<=31) { lx = (hx<<(32-n))|(lx>>n); hx = sx; |