On 5/20/24 4:40 PM, Niels Möller wrote:> Could you use mpz_limbs_write
(x, 2) for the functions that want a
result area of at least two limbs? Added in gmp-6-0.0. There's also the
mpz_realloc2 function, which does something related, but which may also
shrink the allocation.
We do utilize the internal function mpz_realloc for almost everything as
we mostly work with limbs instead of bits.
Just to note, we have "patched" every call to mpz_remove so that the
returning mpz does not have less limbs than we require.
Best,
Albin
P.S. Looks like my previous email didn't make it to the list.
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs