[multiple changes]

Fri May 28 22:20:03 1999  Anthony Green  <green@cygnus.com>
	* java/lang/fdlibm.h: Don't use __uint32_t.  Include mprec.h.
	* java/lang/e_log.c: Don't use __uint32_t.
1999-05-27  Eric Christopher <echristo@cygnus.com>
	* configure: Rebuilt
	* configure.in: Fixed ISO C9X and namespace collision with __uint32_t
	* acconfig.h: Rebuilt
	* include/config.h.in: Rebuilt
	* java/lang/mprec.h, java/lang/e_acos.c, java/lang/e_asin.c,
 	java/lang/e_atan2.c, java/lang/e_exp.c, java/lang/e_fmod.c,
 	e_log.c, java/lang/e_pow.c, java/lang/e_rem_pio2.c,
 	java/lang/e_remainder.c, java/lang/e_sqrt.c, java/lang/fdlibm.h,
 	k_tan.c, java/lang/mprec.h, java/lang/s_atan.c,
 	java/lang/s_ceil.c, java/lang/s_copysign.c, java/lang/s_fabs.c,
 	s_floor.c, java/lang/s_rint.c, java/lang/sf_rint.c: Fixed ISO C9X
 	and namespace collision with __uint32_t

From-SVN: r27729
This commit is contained in:
Tom Tromey 1999-06-24 20:06:09 +00:00
parent fe574d5d92
commit 0d16618c58
31 changed files with 614 additions and 526 deletions

View file

@ -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;