Merge pull request #185 from libtom/leftover_digit_macro
leftover DIGIT() usage
This commit is contained in:
commit
810826d78d
@ -20,7 +20,7 @@ double mp_get_double(const mp_int *a)
|
||||
fac *= 2.0;
|
||||
}
|
||||
for (i = a->used; i --> 0;) {
|
||||
d = (d * fac) + (double)DIGIT(a, i);
|
||||
d = (d * fac) + (double)a->dp[i];
|
||||
}
|
||||
return (a->sign == MP_NEG) ? -d : d;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ int mp_is_square(const mp_int *arg, int *ret)
|
||||
}
|
||||
|
||||
/* First check mod 128 (suppose that DIGIT_BIT is at least 7) */
|
||||
if (rem_128[127u & DIGIT(arg, 0)] == (char)1) {
|
||||
if (rem_128[127u & arg->dp[0]] == (char)1) {
|
||||
return MP_OKAY;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user