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 /libtommath | |
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 'libtommath')
-rw-r--r-- | libtommath/bn_mp_sqrt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libtommath/bn_mp_sqrt.c b/libtommath/bn_mp_sqrt.c index aaeac1d..4481d3a 100644 --- a/libtommath/bn_mp_sqrt.c +++ b/libtommath/bn_mp_sqrt.c @@ -5,7 +5,7 @@ #ifndef NO_FLOATING_POINT #include <math.h> -#if (DIGIT_BIT != 28) || (FLT_RADIX != 2) || (DBL_MANT_DIG != 53) || (DBL_MAX_EXP != 1024) +#if (MP_DIGIT_BIT != 28) || (FLT_RADIX != 2) || (DBL_MANT_DIG != 53) || (DBL_MAX_EXP != 1024) #define NO_FLOATING_POINT #endif #endif @@ -52,7 +52,7 @@ mp_err mp_sqrt(const mp_int *arg, mp_int *ret) d = 0.0; for (k = arg->used-1; k >= j; --k) { - d = ldexp(d, DIGIT_BIT) + (double)(arg->dp[k]); + d = ldexp(d, MP_DIGIT_BIT) + (double)(arg->dp[k]); } /* @@ -64,18 +64,18 @@ mp_err mp_sqrt(const mp_int *arg, mp_int *ret) /* dig is the most significant mp_digit of the square root */ - dig = (mp_digit) ldexp(d, -DIGIT_BIT); + dig = (mp_digit) ldexp(d, -MP_DIGIT_BIT); /* * If the most significant digit is nonzero, find the next digit down - * by subtracting DIGIT_BIT times thie most significant digit. + * by subtracting MP_DIGIT_BIT times thie most significant digit. * Subtract one from the result so that our initial estimate is always * low. */ if (dig) { t1.used = i+2; - d -= ldexp((double) dig, DIGIT_BIT); + d -= ldexp((double) dig, MP_DIGIT_BIT); if (d >= 1.0) { t1.dp[i+1] = dig; t1.dp[i] = ((mp_digit) d) - 1; |