diff options
Diffstat (limited to 'lib/msun/src/e_fmod.c')
-rw-r--r-- | lib/msun/src/e_fmod.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c index 0733d47..d784c68 100644 --- a/lib/msun/src/e_fmod.c +++ b/lib/msun/src/e_fmod.c @@ -5,16 +5,16 @@ * * 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. * ==================================================== */ #ifndef lint -static char rcsid[] = "$Id: e_fmod.c,v 1.6 1994/08/18 23:05:21 jtc Exp $"; +static char rcsid[] = "$Id: e_fmod.c,v 1.1.1.1 1994/08/19 09:39:43 jkh Exp $"; #endif -/* +/* * __ieee754_fmod(x,y) * Return x mod y in exact arithmetic * Method: shift and subtract @@ -51,7 +51,7 @@ 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) + if(lx==ly) return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ } @@ -74,7 +74,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; @@ -86,7 +86,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; @@ -115,7 +115,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[(u_int32_t)sx>>31]; + return Zero[(u_int32_t)sx>>31]; while(hx<0x00100000) { /* normalize x */ hx = hx+hx+(lx>>31); lx = lx+lx; iy -= 1; |