diff options
Diffstat (limited to 'math/atest-exp2.c')
-rw-r--r-- | math/atest-exp2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/math/atest-exp2.c b/math/atest-exp2.c index 7243944c66..059e4ccf02 100644 --- a/math/atest-exp2.c +++ b/math/atest-exp2.c @@ -147,11 +147,11 @@ mpn_bitsize(const mp_limb_t *SRC_PTR, mp_size_t SIZE) for (i = SIZE - 1; i > 0; --i) if (SRC_PTR[i] != 0) break; - for (j = mpbpl - 1; j > 0; --j) - if ((SRC_PTR[i] & 1 << j) != 0) + for (j = mpbpl - 1; j >= 0; --j) + if ((SRC_PTR[i] & (mp_limb_t)1 << j) != 0) break; - return i * 32 + j; + return i * mpbpl + j; } int @@ -192,7 +192,7 @@ main (void) e2s = mpn_bitsize (e2, SZ); e3s = mpn_bitsize (e3, SZ); - if (e3s > 1 && e2s - e3s < 54) + if (e3s >= 0 && e2s - e3s < 54) { #if PRINT_ERRORS printf ("%06x ", i * (0x100000 / (1 << N2))); |