do not use long long for minimum prec calculation, improve comment
This commit is contained in:
parent
a8357d4328
commit
f0ab662ffc
@ -151,9 +151,10 @@ MP_STATIC_ASSERT(correct_word_size, sizeof(mp_word) == (2u * sizeof(mp_digit)))
|
||||
|
||||
/* Minimum number of available digits in mp_int, MP_PREC >= MP_MIN_PREC
|
||||
* - Must be at least 3 for s_mp_div_school.
|
||||
* - Must be large enough such that uint64_t can be stored in mp_int without growing
|
||||
* - Must be large enough such that the mp_set_u64 setter can
|
||||
* store uint64_t in the mp_int without growing
|
||||
*/
|
||||
#define MP_MIN_PREC MP_MAX(3, (((int)MP_SIZEOF_BITS(long long) + MP_DIGIT_BIT) - 1) / MP_DIGIT_BIT)
|
||||
#define MP_MIN_PREC MP_MAX(3, (((int)MP_SIZEOF_BITS(uint64_t) + MP_DIGIT_BIT) - 1) / MP_DIGIT_BIT)
|
||||
MP_STATIC_ASSERT(prec_geq_min_prec, MP_PREC >= MP_MIN_PREC)
|
||||
|
||||
/* random number source */
|
||||
|
Loading…
Reference in New Issue
Block a user