src/libm/e_pow.c
changeset 3337 9ac6f0782dd6
parent 2756 a98604b691c8
child 6044 35448a5ea044
     1.1 --- a/src/libm/e_pow.c	Sun Oct 04 09:18:48 2009 +0000
     1.2 +++ b/src/libm/e_pow.c	Sun Oct 04 09:51:04 2009 +0000
     1.3 @@ -76,7 +76,7 @@
     1.4       0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */
     1.5  
     1.6           zero = 0.0, one = 1.0, two = 2.0, two53 = 9007199254740992.0,  /* 0x43400000, 0x00000000 */
     1.7 -         huge = 1.0e300, tiny = 1.0e-300,
     1.8 +         huge_val = 1.0e300, tiny = 1.0e-300,
     1.9           /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
    1.10           L1 = 5.99999999999994648725e-01,       /* 0x3FE33333, 0x33333303 */
    1.11           L2 = 4.28571428578550184252e-01,       /* 0x3FDB6DB6, 0xDB6FABFF */
    1.12 @@ -199,15 +199,15 @@
    1.13           if (iy > 0x41e00000) { /* if |y| > 2**31 */
    1.14               if (iy > 0x43f00000) {     /* if |y| > 2**64, must o/uflow */
    1.15                   if (ix <= 0x3fefffff)
    1.16 -                     return (hy < 0) ? huge * huge : tiny * tiny;
    1.17 +                     return (hy < 0) ? huge_val * huge_val : tiny * tiny;
    1.18                   if (ix >= 0x3ff00000)
    1.19 -                     return (hy > 0) ? huge * huge : tiny * tiny;
    1.20 +                     return (hy > 0) ? huge_val * huge_val : tiny * tiny;
    1.21               }
    1.22               /* over/underflow if x is not close to one */
    1.23               if (ix < 0x3fefffff)
    1.24 -                 return (hy < 0) ? huge * huge : tiny * tiny;
    1.25 +                 return (hy < 0) ? huge_val * huge_val : tiny * tiny;
    1.26               if (ix > 0x3ff00000)
    1.27 -                 return (hy > 0) ? huge * huge : tiny * tiny;
    1.28 +                 return (hy > 0) ? huge_val * huge_val : tiny * tiny;
    1.29               /* now |1-x| is tiny <= 2**-20, suffice to compute
    1.30                  log(x) by x-x^2/2+x^3/3-x^4/4 */
    1.31               t = x - 1;         /* t has 20 trailing zeros */
    1.32 @@ -293,10 +293,10 @@
    1.33           EXTRACT_WORDS(j, i, z);
    1.34           if (j >= 0x40900000) { /* z >= 1024 */
    1.35               if (((j - 0x40900000) | i) != 0)   /* if z > 1024 */
    1.36 -                 return s * huge * huge;        /* overflow */
    1.37 +                 return s * huge_val * huge_val;        /* overflow */
    1.38               else {
    1.39                   if (p_l + ovt > z - p_h)
    1.40 -                     return s * huge * huge;    /* overflow */
    1.41 +                     return s * huge_val * huge_val;    /* overflow */
    1.42               }
    1.43           } else if ((j & 0x7fffffff) >= 0x4090cc00) {   /* z <= -1075 */
    1.44               if (((j - 0xc090cc00) | i) != 0)   /* z < -1075 */