Attachment "pow10vals.diff" to
ticket [1800636fff]
added by
fireegl
2007-09-23 22:43:43.
diff -urN tcl-orig/generic/tclStrToD.c tcl-new/generic/tclStrToD.c
--- tcl-orig/generic/tclStrToD.c 2007-04-23 11:34:07.000000000 -0600
+++ tcl-new/generic/tclStrToD.c 2007-09-23 08:57:16.375000000 -0600
@@ -83,7 +83,7 @@
* exactly as wide integers. */
static Tcl_WideUInt *pow10_wide;
#define MAXPOW 22
-static double pow10[MAXPOW+1]; /* The powers of ten that can be represented
+static double pow10vals[MAXPOW+1]; /* The powers of ten that can be represented
* exactly as IEEE754 doubles. */
static int mmaxpow; /* Largest power of ten that can be
* represented exactly in a 'double'. */
@@ -1310,7 +1310,7 @@
* without special handling.
*/
- retval = (double)(Tcl_WideInt)significand * pow10[ exponent ];
+ retval = (double)(Tcl_WideInt)significand * pow10vals[ exponent ];
goto returnValue;
} else {
int diff = DBL_DIG - numSigDigs;
@@ -1323,8 +1323,8 @@
*/
volatile double factor =
- (double)(Tcl_WideInt)significand * pow10[diff];
- retval = factor * pow10[exponent-diff];
+ (double)(Tcl_WideInt)significand * pow10vals[diff];
+ retval = factor * pow10vals[exponent-diff];
goto returnValue;
}
}
@@ -1336,7 +1336,7 @@
* only one rounding.
*/
- retval = (double)(Tcl_WideInt)significand / pow10[-exponent];
+ retval = (double)(Tcl_WideInt)significand / pow10vals[-exponent];
goto returnValue;
}
}
@@ -2165,7 +2165,7 @@
mmaxpow = MAXPOW;
}
for (i=0 ; i<=mmaxpow ; ++i) {
- pow10[i] = d;
+ pow10vals[i] = d;
d *= 10.0;
}
@@ -2558,7 +2558,7 @@
* Multiply by 10**exponent
*/
- retval = frexp(retval * pow10[exponent&0xf], &j);
+ retval = frexp(retval * pow10vals[exponent&0xf], &j);
expt += j;
for (i=4; i<9; ++i) {
if (exponent & (1<<i)) {
@@ -2571,7 +2571,7 @@
* Divide by 10**-exponent
*/
- retval = frexp(retval / pow10[(-exponent) & 0xf], &j);
+ retval = frexp(retval / pow10vals[(-exponent) & 0xf], &j);
expt += j;
for (i=4; i<9; ++i) {
if ((-exponent) & (1<<i)) {