gmp-4.1.2 assertion failure
Kevin Ryde
user42 at zip.com.au
Sun Feb 15 08:42:34 CET 2004
Jason <jasonmoxham at btclick.com> writes:
>
> umul_ppmm (t3, t4, bsize, e);
> umul_ppmm (t5, t6, cnt - GMP_NAIL_BITS, e);
Yep, that'll be the idea.
> t2 = GMP_NUMB_BITS;
> ...
> udiv_qrnnd (t8, t1, t5, t6, t2);
No, in the normal case where GMP_NUMB_BITS is a power of 2 it should
be shifts, not udiv_qrnnd. Could hide a 2-limb by numb_bits division
in a macro to avoid junking up the code with conditionals.
> #define MAX_USEFULL_MP_SIZE_T_MAX (MP_SIZE_T_MAX/BYTES_PER_MP_LIMB)
That has to look at SIZE_T_MAX too, since size_t is what we pass to
the alloc functions.
I'm not sure what we can say about the relative sizes of mp_size_t and
size_t. Probably mp_size_t >= size_t normally, but on cray where
mp_size_t is an int maybe that's not so.
Incidentally, when mp_limb_t is a longlong bigger than ulong, the
current simple expression can probably be retained, if we felt like
checking that.
More information about the gmp-bugs
mailing list