diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-25 16:24:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-25 16:24:11 (GMT) |
commit | 44f5f557eff96e7d4f2f5aede487c3ab6fe41063 (patch) | |
tree | 120e4c636d5717e7473b89dfe9f4b726e6d0613d /generic/tclStrToD.c | |
parent | e22b6eb9ab3f112da9df627518d50d30615d655f (diff) | |
parent | d31b63df9cce749a88f06ee81883cbe92be28c77 (diff) | |
download | tcl-44f5f557eff96e7d4f2f5aede487c3ab6fe41063.zip tcl-44f5f557eff96e7d4f2f5aede487c3ab6fe41063.tar.gz tcl-44f5f557eff96e7d4f2f5aede487c3ab6fe41063.tar.bz2 |
Merge 8.6.
Also remove unused variable in unix/tclUnixFile.c
Diffstat (limited to 'generic/tclStrToD.c')
-rw-r--r-- | generic/tclStrToD.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index cb55e14..402735f 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -145,7 +145,7 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); #define QUICK_MAX 14 /* floor((FP_PRECISION-1)*log(2)/log(10))-1 */ #define BLETCH 0x10 /* Highest power of two that is greater than * DBL_MAX_10_EXP, divided by 16. */ -#define DIGIT_GROUP 8 /* floor(DIGIT_BIT*log(2)/log(10)) */ +#define DIGIT_GROUP 8 /* floor(MP_DIGIT_BIT*log(2)/log(10)) */ /* * Union used to dismantle floating point numbers. @@ -1485,9 +1485,9 @@ AccumulateDecimalDigit( * More than single digit multiplication. Multiply by the appropriate * small powers of 5, and then shift. Large strings of zeroes are * eaten 256 at a time; this is less efficient than it could be, but - * seems implausible. We presume that DIGIT_BIT is at least 27. The + * seems implausible. We presume that MP_DIGIT_BIT is at least 27. The * first multiplication, by up to 10**7, is done with a one-DIGIT - * multiply (this presumes that DIGIT_BIT >= 24). + * multiply (this presumes that MP_DIGIT_BIT >= 24). */ n = numZeros + 1; @@ -3129,7 +3129,7 @@ StrictInt64Conversion( * * Test whether bankers' rounding should round a digit up. Assumption is * made that the denominator of the fraction being tested is a power of - * 2**DIGIT_BIT. + * 2**MP_DIGIT_BIT. * * Results: * Returns 1 iff the fraction is more than 1/2, or if the fraction is @@ -3141,7 +3141,7 @@ StrictInt64Conversion( static inline int ShouldBankerRoundUpPowD( mp_int *b, /* Numerator of the fraction. */ - int sd, /* Denominator is 2**(sd*DIGIT_BIT). */ + int sd, /* Denominator is 2**(sd*MP_DIGIT_BIT). */ int isodd) /* 1 if the digit is odd, 0 if even. */ { int i; @@ -3180,7 +3180,7 @@ static inline int ShouldBankerRoundUpToNextPowD( mp_int *b, /* Numerator of the fraction. */ mp_int *m, /* Numerator of the rounding tolerance. */ - int sd, /* Common denominator is 2**(sd*DIGIT_BIT). */ + int sd, /* Common denominator is 2**(sd*MP_DIGIT_BIT). */ int isodd, /* 1 if the integer significand is odd. */ mp_int *temp) /* Work area for the calculation. */ { @@ -3189,7 +3189,7 @@ ShouldBankerRoundUpToNextPowD( /* * Compare B and S-m - which is the same as comparing B+m and S - which we * do by computing b+m and doing a bitwhack compare against - * 2**(DIGIT_BIT*sd) + * 2**(MP_DIGIT_BIT*sd) */ mp_add(b, m, temp); @@ -3217,7 +3217,7 @@ ShouldBankerRoundUpToNextPowD( * Converts a double-precision number to the shortest string of digits * that reconverts exactly to the given number, or to 'ilim' digits if * that will yield a shorter result. The denominator in David Gay's - * conversion algorithm is known to be a power of 2**DIGIT_BIT, and hence + * conversion algorithm is known to be a power of 2**MP_DIGIT_BIT, and hence * the division in the main loop may be replaced by a digit shift and * mask. * @@ -3297,7 +3297,7 @@ ShorteningBignumConversionPowD( mp_init(&temp); /* - * Loop through the digits. Do division and mod by s == 2**(sd*DIGIT_BIT) + * Loop through the digits. Do division and mod by s == 2**(sd*MP_DIGIT_BIT) * by mp_digit extraction. */ @@ -3409,7 +3409,7 @@ ShorteningBignumConversionPowD( * Converts a double-precision number to a fixed-lengt string of 'ilim' * digits (or 'ilim1' if log10(d) has been overestimated). The * denominator in David Gay's conversion algorithm is known to be a power - * of 2**DIGIT_BIT, and hence the division in the main loop may be + * of 2**MP_DIGIT_BIT, and hence the division in the main loop may be * replaced by a digit shift and mask. * * Results: @@ -3466,7 +3466,7 @@ StrictBignumConversionPowD( } /* - * Loop through the digits. Do division and mod by s == 2**(sd*DIGIT_BIT) + * Loop through the digits. Do division and mod by s == 2**(sd*MP_DIGIT_BIT) * by mp_digit extraction. */ @@ -4208,7 +4208,7 @@ TclDoubleDigits( } else if (s5 == 0) { /* * The denominator is a power of 2, so we can replace division by - * digit shifts. First we round up s2 to a multiple of DIGIT_BIT, + * digit shifts. First we round up s2 to a multiple of MP_DIGIT_BIT, * and adjust m2 and b2 accordingly. Then we launch into a version * of the comparison that's specialized for the 'power of mp_digit * in the denominator' case. @@ -4264,7 +4264,7 @@ TclDoubleDigits( } else if (s5 == 0) { /* * The denominator is a power of 2, so we can replace division by - * digit shifts. First we round up s2 to a multiple of DIGIT_BIT, + * digit shifts. First we round up s2 to a multiple of MP_DIGIT_BIT, * and adjust m2 and b2 accordingly. Then we launch into a version * of the comparison that's specialized for the 'power of mp_digit * in the denominator' case. |