diff options
-rw-r--r-- | lib/libm/src/e_hypot.c | 14 | ||||
-rw-r--r-- | lib/libm/src/e_hypotf.c | 8 | ||||
-rw-r--r-- | lib/libm/src/e_pow.c | 12 | ||||
-rw-r--r-- | lib/libm/src/e_powf.c | 10 | ||||
-rw-r--r-- | lib/libm/src/s_ceil.c | 22 | ||||
-rw-r--r-- | lib/libm/src/s_ceilf.c | 14 | ||||
-rw-r--r-- | lib/libm/src/s_floor.c | 22 | ||||
-rw-r--r-- | lib/libm/src/s_floorf.c | 14 | ||||
-rw-r--r-- | lib/libm/src/s_modff.c | 10 | ||||
-rw-r--r-- | lib/libm/src/s_rint.c | 22 | ||||
-rw-r--r-- | lib/libm/src/s_rintf.c | 14 | ||||
-rw-r--r-- | lib/libm/src/s_trunc.c | 16 | ||||
-rw-r--r-- | lib/libm/src/s_truncf.c | 12 |
13 files changed, 95 insertions, 95 deletions
diff --git a/lib/libm/src/e_hypot.c b/lib/libm/src/e_hypot.c index 1116def0d91..6dc49042b63 100644 --- a/lib/libm/src/e_hypot.c +++ b/lib/libm/src/e_hypot.c @@ -30,9 +30,9 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $"; * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y * where x1 = x with lower 32 bits cleared, x2 = x-x1; else * 2. if x <= 2y use - * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y)) + * t1*yy1+((x-y)*(x-y)+(t1*y2+t2*y)) * where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1, - * y1= y with lower 32 bits chopped, y2 = y-y1. + * yy1= y with lower 32 bits chopped, y2 = y-yy1. * * NOTE: scaling may be necessary if some argument is too * large or too tiny @@ -52,7 +52,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $"; double __ieee754_hypot(double x, double y) { - double a=x,b=y,t1,t2,y1,y2,w; + double a=x,b=y,t1,t2,yy1,y2,w; int32_t j,k,ha,hb; GET_HIGH_WORD(ha,x); @@ -106,13 +106,13 @@ __ieee754_hypot(double x, double y) w = __ieee754_sqrt(t1*t1-(b*(-b)-t2*(a+t1))); } else { a = a+a; - y1 = 0; - SET_HIGH_WORD(y1,hb); - y2 = b - y1; + yy1 = 0; + SET_HIGH_WORD(yy1,hb); + y2 = b - yy1; t1 = 0; SET_HIGH_WORD(t1,ha+0x00100000); t2 = a - t1; - w = __ieee754_sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b))); + w = __ieee754_sqrt(t1*yy1-(w*(-w)-(t1*y2+t2*b))); } if(k!=0) { u_int32_t high; diff --git a/lib/libm/src/e_hypotf.c b/lib/libm/src/e_hypotf.c index 6657493da23..db781f5dfdc 100644 --- a/lib/libm/src/e_hypotf.c +++ b/lib/libm/src/e_hypotf.c @@ -23,7 +23,7 @@ static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $"; float __ieee754_hypotf(float x, float y) { - float a=x,b=y,t1,t2,y1,y2,w; + float a=x,b=y,t1,t2,yy1,y2,w; int32_t j,k,ha,hb; GET_FLOAT_WORD(ha,x); @@ -70,11 +70,11 @@ __ieee754_hypotf(float x, float y) w = __ieee754_sqrtf(t1*t1-(b*(-b)-t2*(a+t1))); } else { a = a+a; - SET_FLOAT_WORD(y1,hb&0xfffff000); - y2 = b - y1; + SET_FLOAT_WORD(yy1,hb&0xfffff000); + y2 = b - yy1; SET_FLOAT_WORD(t1,ha+0x00800000); t2 = a - t1; - w = __ieee754_sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b))); + w = __ieee754_sqrtf(t1*yy1-(w*(-w)-(t1*y2+t2*b))); } if(k!=0) { SET_FLOAT_WORD(t1,0x3f800000+(k<<23)); diff --git a/lib/libm/src/e_pow.c b/lib/libm/src/e_pow.c index 916b4c20be8..9ee8279ea3a 100644 --- a/lib/libm/src/e_pow.c +++ b/lib/libm/src/e_pow.c @@ -99,7 +99,7 @@ double __ieee754_pow(double x, double y) { double z,ax,z_h,z_l,p_h,p_l; - double y1,t1,t2,r,s,t,u,v,w; + double yy1,t1,t2,r,s,t,u,v,w; int32_t i,j,k,yisint,n; int32_t hx,hy,ix,iy; u_int32_t lx,ly; @@ -247,11 +247,11 @@ __ieee754_pow(double x, double y) if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0) s = -one;/* (-ve)**(odd int) */ - /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */ - y1 = y; - SET_LOW_WORD(y1,0); - p_l = (y-y1)*t1+y*t2; - p_h = y1*t1; + /* split up y into yy1+y2 and compute (yy1+y2)*(t1+t2) */ + yy1 = y; + SET_LOW_WORD(yy1,0); + p_l = (y-yy1)*t1+y*t2; + p_h = yy1*t1; z = p_l+p_h; EXTRACT_WORDS(j,i,z); if (j>=0x40900000) { /* z >= 1024 */ diff --git a/lib/libm/src/e_powf.c b/lib/libm/src/e_powf.c index 40659832393..0555bf85b0c 100644 --- a/lib/libm/src/e_powf.c +++ b/lib/libm/src/e_powf.c @@ -57,7 +57,7 @@ float __ieee754_powf(float x, float y) { float z,ax,z_h,z_l,p_h,p_l; - float y1,t1,t2,r,s,t,u,v,w; + float yy1,t1,t2,r,s,t,u,v,w; int32_t i,j,k,yisint,n; int32_t hx,hy,ix,iy,is; @@ -195,11 +195,11 @@ __ieee754_powf(float x, float y) if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0) s = -one; /* (-ve)**(odd int) */ - /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */ + /* split up y into yy1+y2 and compute (yy1+y2)*(t1+t2) */ GET_FLOAT_WORD(is,y); - SET_FLOAT_WORD(y1,is&0xfffff000); - p_l = (y-y1)*t1+y*t2; - p_h = y1*t1; + SET_FLOAT_WORD(yy1,is&0xfffff000); + p_l = (y-yy1)*t1+y*t2; + p_h = yy1*t1; z = p_l+p_h; GET_FLOAT_WORD(j,z); if (j>0x43000000) /* if z > 128 */ diff --git a/lib/libm/src/s_ceil.c b/lib/libm/src/s_ceil.c index 07a7bd8069b..fd89cebb596 100644 --- a/lib/libm/src/s_ceil.c +++ b/lib/libm/src/s_ceil.c @@ -31,35 +31,35 @@ static const double huge = 1.0e300; double ceil(double x) { - int32_t i0,i1,j0; + int32_t i0,i1,jj0; u_int32_t i,j; EXTRACT_WORDS(i0,i1,x); - j0 = ((i0>>20)&0x7ff)-0x3ff; - if(j0<20) { - if(j0<0) { /* raise inexact if x != 0 */ + jj0 = ((i0>>20)&0x7ff)-0x3ff; + if(jj0<20) { + if(jj0<0) { /* raise inexact if x != 0 */ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */ if(i0<0) {i0=0x80000000;i1=0;} else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;} } } else { - i = (0x000fffff)>>j0; + i = (0x000fffff)>>jj0; if(((i0&i)|i1)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ - if(i0>0) i0 += (0x00100000)>>j0; + if(i0>0) i0 += (0x00100000)>>jj0; i0 &= (~i); i1=0; } } - } else if (j0>51) { - if(j0==0x400) return x+x; /* inf or NaN */ + } else if (jj0>51) { + if(jj0==0x400) return x+x; /* inf or NaN */ else return x; /* x is integral */ } else { - i = ((u_int32_t)(0xffffffff))>>(j0-20); + i = ((u_int32_t)(0xffffffff))>>(jj0-20); if((i1&i)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ if(i0>0) { - if(j0==20) i0+=1; + if(jj0==20) i0+=1; else { - j = i1 + (1<<(52-j0)); + j = i1 + (1<<(52-jj0)); if(j<i1) i0+=1; /* got a carry */ i1 = j; } diff --git a/lib/libm/src/s_ceilf.c b/lib/libm/src/s_ceilf.c index d956347a4af..cd955b8b23a 100644 --- a/lib/libm/src/s_ceilf.c +++ b/lib/libm/src/s_ceilf.c @@ -25,27 +25,27 @@ static const float huge = 1.0e30; float ceilf(float x) { - int32_t i0,j0; + int32_t i0,jj0; u_int32_t i; GET_FLOAT_WORD(i0,x); - j0 = ((i0>>23)&0xff)-0x7f; - if(j0<23) { - if(j0<0) { /* raise inexact if x != 0 */ + jj0 = ((i0>>23)&0xff)-0x7f; + if(jj0<23) { + if(jj0<0) { /* raise inexact if x != 0 */ if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */ if(i0<0) {i0=0x80000000;} else if(i0!=0) { i0=0x3f800000;} } } else { - i = (0x007fffff)>>j0; + i = (0x007fffff)>>jj0; if((i0&i)==0) return x; /* x is integral */ if(huge+x>(float)0.0) { /* raise inexact flag */ - if(i0>0) i0 += (0x00800000)>>j0; + if(i0>0) i0 += (0x00800000)>>jj0; i0 &= (~i); } } } else { - if(j0==0x80) return x+x; /* inf or NaN */ + if(jj0==0x80) return x+x; /* inf or NaN */ else return x; /* x is integral */ } SET_FLOAT_WORD(x,i0); diff --git a/lib/libm/src/s_floor.c b/lib/libm/src/s_floor.c index fa76291ec77..da2c77fad68 100644 --- a/lib/libm/src/s_floor.c +++ b/lib/libm/src/s_floor.c @@ -31,36 +31,36 @@ static const double huge = 1.0e300; double floor(double x) { - int32_t i0,i1,j0; + int32_t i0,i1,jj0; u_int32_t i,j; EXTRACT_WORDS(i0,i1,x); - j0 = ((i0>>20)&0x7ff)-0x3ff; - if(j0<20) { - if(j0<0) { /* raise inexact if x != 0 */ + jj0 = ((i0>>20)&0x7ff)-0x3ff; + if(jj0<20) { + if(jj0<0) { /* raise inexact if x != 0 */ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */ if(i0>=0) {i0=i1=0;} else if(((i0&0x7fffffff)|i1)!=0) { i0=0xbff00000;i1=0;} } } else { - i = (0x000fffff)>>j0; + i = (0x000fffff)>>jj0; if(((i0&i)|i1)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ - if(i0<0) i0 += (0x00100000)>>j0; + if(i0<0) i0 += (0x00100000)>>jj0; i0 &= (~i); i1=0; } } - } else if (j0>51) { - if(j0==0x400) return x+x; /* inf or NaN */ + } else if (jj0>51) { + if(jj0==0x400) return x+x; /* inf or NaN */ else return x; /* x is integral */ } else { - i = ((u_int32_t)(0xffffffff))>>(j0-20); + i = ((u_int32_t)(0xffffffff))>>(jj0-20); if((i1&i)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ if(i0<0) { - if(j0==20) i0+=1; + if(jj0==20) i0+=1; else { - j = i1+(1<<(52-j0)); + j = i1+(1<<(52-jj0)); if(j<i1) i0 +=1 ; /* got a carry */ i1=j; } diff --git a/lib/libm/src/s_floorf.c b/lib/libm/src/s_floorf.c index c1c99e0dc75..db7fd4d866c 100644 --- a/lib/libm/src/s_floorf.c +++ b/lib/libm/src/s_floorf.c @@ -34,27 +34,27 @@ static const float huge = 1.0e30; float floorf(float x) { - int32_t i0,j0; + int32_t i0,jj0; u_int32_t i; GET_FLOAT_WORD(i0,x); - j0 = ((i0>>23)&0xff)-0x7f; - if(j0<23) { - if(j0<0) { /* raise inexact if x != 0 */ + jj0 = ((i0>>23)&0xff)-0x7f; + if(jj0<23) { + if(jj0<0) { /* raise inexact if x != 0 */ if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */ if(i0>=0) {i0=0;} else if((i0&0x7fffffff)!=0) { i0=0xbf800000;} } } else { - i = (0x007fffff)>>j0; + i = (0x007fffff)>>jj0; if((i0&i)==0) return x; /* x is integral */ if(huge+x>(float)0.0) { /* raise inexact flag */ - if(i0<0) i0 += (0x00800000)>>j0; + if(i0<0) i0 += (0x00800000)>>jj0; i0 &= (~i); } } } else { - if(j0==0x80) return x+x; /* inf or NaN */ + if(jj0==0x80) return x+x; /* inf or NaN */ else return x; /* x is integral */ } SET_FLOAT_WORD(x,i0); diff --git a/lib/libm/src/s_modff.c b/lib/libm/src/s_modff.c index 1da89b3e515..0ede078565d 100644 --- a/lib/libm/src/s_modff.c +++ b/lib/libm/src/s_modff.c @@ -25,16 +25,16 @@ static const float one = 1.0; float modff(float x, float *iptr) { - int32_t i0,j0; + int32_t i0,jj0; u_int32_t i; GET_FLOAT_WORD(i0,x); - j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */ - if(j0<23) { /* integer part in x */ - if(j0<0) { /* |x|<1 */ + jj0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */ + if(jj0<23) { /* integer part in x */ + if(jj0<0) { /* |x|<1 */ SET_FLOAT_WORD(*iptr,i0&0x80000000); /* *iptr = +-0 */ return x; } else { - i = (0x007fffff)>>j0; + i = (0x007fffff)>>jj0; if((i0&i)==0) { /* x is integral */ u_int32_t ix; *iptr = x; diff --git a/lib/libm/src/s_rint.c b/lib/libm/src/s_rint.c index cefa9f22ba4..192a765d7d0 100644 --- a/lib/libm/src/s_rint.c +++ b/lib/libm/src/s_rint.c @@ -36,14 +36,14 @@ TWO52[2]={ double rint(double x) { - int32_t i0,j0,sx; + int32_t i0,jj0,sx; u_int32_t i,i1; double w,t; EXTRACT_WORDS(i0,i1,x); sx = (i0>>31)&1; - j0 = ((i0>>20)&0x7ff)-0x3ff; - if(j0<20) { - if(j0<0) { + jj0 = ((i0>>20)&0x7ff)-0x3ff; + if(jj0<20) { + if(jj0<0) { if(((i0&0x7fffffff)|i1)==0) return x; i1 |= (i0&0x0fffff); i0 &= 0xfffe0000; @@ -55,22 +55,22 @@ rint(double x) SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31)); return t; } else { - i = (0x000fffff)>>j0; + i = (0x000fffff)>>jj0; if(((i0&i)|i1)==0) return x; /* x is integral */ i>>=1; if(((i0&i)|i1)!=0) { - if(j0==19) i1 = 0x40000000; else - i0 = (i0&(~i))|((0x20000)>>j0); + if(jj0==19) i1 = 0x40000000; else + i0 = (i0&(~i))|((0x20000)>>jj0); } } - } else if (j0>51) { - if(j0==0x400) return x+x; /* inf or NaN */ + } else if (jj0>51) { + if(jj0==0x400) return x+x; /* inf or NaN */ else return x; /* x is integral */ } else { - i = ((u_int32_t)(0xffffffff))>>(j0-20); + i = ((u_int32_t)(0xffffffff))>>(jj0-20); if((i1&i)==0) return x; /* x is integral */ i>>=1; - if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20)); + if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(jj0-20)); } INSERT_WORDS(x,i0,i1); w = TWO52[sx]+x; diff --git a/lib/libm/src/s_rintf.c b/lib/libm/src/s_rintf.c index c04ce2dcf95..c4d1ebf9ae1 100644 --- a/lib/libm/src/s_rintf.c +++ b/lib/libm/src/s_rintf.c @@ -29,14 +29,14 @@ TWO23[2]={ float rintf(float x) { - int32_t i0,j0,sx; + int32_t i0,jj0,sx; u_int32_t i,i1; float w,t; GET_FLOAT_WORD(i0,x); sx = (i0>>31)&1; - j0 = ((i0>>23)&0xff)-0x7f; - if(j0<23) { - if(j0<0) { + jj0 = ((i0>>23)&0xff)-0x7f; + if(jj0<23) { + if(jj0<0) { if((i0&0x7fffffff)==0) return x; i1 = (i0&0x07fffff); i0 &= 0xfff00000; @@ -48,13 +48,13 @@ rintf(float x) SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31)); return t; } else { - i = (0x007fffff)>>j0; + i = (0x007fffff)>>jj0; if((i0&i)==0) return x; /* x is integral */ i>>=1; - if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0); + if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>jj0); } } else { - if(j0==0x80) return x+x; /* inf or NaN */ + if(jj0==0x80) return x+x; /* inf or NaN */ else return x; /* x is integral */ } SET_FLOAT_WORD(x,i0); diff --git a/lib/libm/src/s_trunc.c b/lib/libm/src/s_trunc.c index 079956b1178..3fdf02a2bc0 100644 --- a/lib/libm/src/s_trunc.c +++ b/lib/libm/src/s_trunc.c @@ -32,28 +32,28 @@ static const double huge = 1.0e300; double trunc(double x) { - int32_t i0,i1,j0; + int32_t i0,i1,jj0; u_int32_t i; EXTRACT_WORDS(i0,i1,x); - j0 = ((i0>>20)&0x7ff)-0x3ff; - if(j0<20) { - if(j0<0) { /* raise inexact if x != 0 */ + jj0 = ((i0>>20)&0x7ff)-0x3ff; + if(jj0<20) { + if(jj0<0) { /* raise inexact if x != 0 */ if(huge+x>0.0) {/* |x|<1, so return 0*sign(x) */ i0 &= 0x80000000U; i1 = 0; } } else { - i = (0x000fffff)>>j0; + i = (0x000fffff)>>jj0; if(((i0&i)|i1)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ i0 &= (~i); i1=0; } } - } else if (j0>51) { - if(j0==0x400) return x+x; /* inf or NaN */ + } else if (jj0>51) { + if(jj0==0x400) return x+x; /* inf or NaN */ else return x; /* x is integral */ } else { - i = ((u_int32_t)(0xffffffff))>>(j0-20); + i = ((u_int32_t)(0xffffffff))>>(jj0-20); if((i1&i)==0) return x; /* x is integral */ if(huge+x>0.0) /* raise inexact flag */ i1 &= (~i); diff --git a/lib/libm/src/s_truncf.c b/lib/libm/src/s_truncf.c index 5480dddac9e..7842ea7b2ce 100644 --- a/lib/libm/src/s_truncf.c +++ b/lib/libm/src/s_truncf.c @@ -32,22 +32,22 @@ static const float huge = 1.0e30F; float truncf(float x) { - int32_t i0,j0; + int32_t i0,jj0; u_int32_t i; GET_FLOAT_WORD(i0,x); - j0 = ((i0>>23)&0xff)-0x7f; - if(j0<23) { - if(j0<0) { /* raise inexact if x != 0 */ + jj0 = ((i0>>23)&0xff)-0x7f; + if(jj0<23) { + if(jj0<0) { /* raise inexact if x != 0 */ if(huge+x>0.0F) /* |x|<1, so return 0*sign(x) */ i0 &= 0x80000000; } else { - i = (0x007fffff)>>j0; + i = (0x007fffff)>>jj0; if((i0&i)==0) return x; /* x is integral */ if(huge+x>0.0F) /* raise inexact flag */ i0 &= (~i); } } else { - if(j0==0x80) return x+x; /* inf or NaN */ + if(jj0==0x80) return x+x; /* inf or NaN */ else return x; /* x is integral */ } SET_FLOAT_WORD(x,i0); |