math(3): Remove some dead initialization.
authorSascha Wildner <saw@online.de>
Tue, 1 Sep 2009 12:00:49 +0000 (14:00 +0200)
committerSascha Wildner <saw@online.de>
Tue, 1 Sep 2009 12:02:16 +0000 (14:02 +0200)
In-discussion-with: Stathis Kamperis <ekamperi@gmail.com>

lib/libm/src/e_hypot.c
lib/libm/src/e_hypotf.c
lib/libm/src/e_lgamma_r.c
lib/libm/src/e_lgammaf_r.c
lib/libm/src/s_expm1.c
lib/libm/src/s_expm1f.c

index 20a8774..31ed592 100644 (file)
@@ -51,7 +51,7 @@
 double
 hypot(double x, double y)
 {
-       double a=x,b=y,t1,t2,y1_,y2,w;
+       double a,b,t1,t2,y1_,y2,w;
        int32_t j,k,ha,hb;
 
        GET_HIGH_WORD(ha,x);
index 9eed0f7..9063562 100644 (file)
 float
 hypotf(float x, float y)
 {
-       float a=x,b=y,t1,t2,y1_,y2,w;
+       float a,b,t1,t2,y1_,y2,w;
        int32_t j,k,ha,hb;
 
        GET_FLOAT_WORD(ha,x);
        ha &= 0x7fffffff;
        GET_FLOAT_WORD(hb,y);
        hb &= 0x7fffffff;
-       if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
+       if(hb > ha) {j=ha;ha=hb;hb=j;}
        SET_FLOAT_WORD(a,ha);   /* a <- |a| */
        SET_FLOAT_WORD(b,hb);   /* b <- |b| */
        if((ha-hb)>0xf000000) {return a+b;} /* x/y > 2**30 */
index e0d68fb..3b217d5 100644 (file)
@@ -267,7 +267,6 @@ lgamma_r(double x, int *signgamp)
        }
        else if(ix<0x40200000) {                        /* x < 8.0 */
            i = (int)x;
-           t = zero;
            y = x-(double)i;
            p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
            q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));
index 8ea9021..85283cd 100644 (file)
@@ -203,7 +203,6 @@ lgammaf_r(float x, int *signgamp)
        }
        else if(ix<0x41000000) {                        /* x < 8.0 */
            i = (int)x;
-           t = zero;
            y = x-(float)i;
            p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
            q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));
index 28327fb..aa32143 100644 (file)
@@ -136,7 +136,6 @@ expm1(double x)
        c = 0;
        GET_HIGH_WORD(hx,x);
        xsb = hx&0x80000000;            /* sign bit of x */
-       if(xsb==0) y=x; else y= -x;     /* y = |x| */
        hx &= 0x7fffffff;               /* high word of |x| */
 
     /* filter out huge and non-finite argument */
index ba98625..aace9f0 100644 (file)
@@ -44,7 +44,6 @@ expm1f(float x)
        c = 0;
        GET_FLOAT_WORD(hx,x);
        xsb = hx&0x80000000;            /* sign bit of x */
-       if(xsb==0) y=x; else y= -x;     /* y = |x| */
        hx &= 0x7fffffff;               /* high word of |x| */
 
     /* filter out huge and non-finite argument */
@@ -106,7 +105,6 @@ expm1f(float x)
                SET_FLOAT_WORD(y,i+(k<<23));    /* add k to y's exponent */
                return y-one;
            }
-           t = one;
            if(k<23) {
                int32_t i;
                SET_FLOAT_WORD(t,0x3f800000 - (0x1000000>>k)); /* t=1-2^-k */