additional bugfixes
This commit is contained in:
parent
3ec93dab9e
commit
09133c9349
@ -248,7 +248,7 @@ int mp_prime_is_prime(const mp_int *a, int t, int *result)
|
|||||||
* Hence the ugly type-fiddling in the following code.
|
* Hence the ugly type-fiddling in the following code.
|
||||||
*/
|
*/
|
||||||
size_a = mp_count_bits(a);
|
size_a = mp_count_bits(a);
|
||||||
mask = (1u << floor_ilog2(size_a)) - 1u;
|
mask = (1u << s_floor_ilog2(size_a)) - 1u;
|
||||||
/*
|
/*
|
||||||
Assuming the General Rieman hypothesis (never thought to write that in a
|
Assuming the General Rieman hypothesis (never thought to write that in a
|
||||||
comment) the upper bound can be lowered to 2*(log a)^2.
|
comment) the upper bound can be lowered to 2*(log a)^2.
|
||||||
|
@ -294,7 +294,7 @@ int mp_prime_strong_lucas_selfridge(const mp_int *a, int *result)
|
|||||||
if ((e = mp_mul(&U2mz,&Uz,&T4z)) != MP_OKAY) {
|
if ((e = mp_mul(&U2mz,&Uz,&T4z)) != MP_OKAY) {
|
||||||
goto LBL_LS_ERR;
|
goto LBL_LS_ERR;
|
||||||
}
|
}
|
||||||
if ((e = mp_mul_si(&T4z,(long)Ds,&T4z)) != MP_OKAY) {
|
if ((e = s_mp_mul_si(&T4z,(long)Ds,&T4z)) != MP_OKAY) {
|
||||||
goto LBL_LS_ERR;
|
goto LBL_LS_ERR;
|
||||||
}
|
}
|
||||||
if ((e = mp_add(&T1z,&T2z,&Uz)) != MP_OKAY) {
|
if ((e = mp_add(&T1z,&T2z,&Uz)) != MP_OKAY) {
|
||||||
|
Loading…
Reference in New Issue
Block a user