mpz_limbs_modify doesn't clear new limbs
Vincent Lefevre
vincent at vinc17.net
Thu Jan 2 11:07:41 CET 2025
Hi,
On 2025-01-02 10:31:55 +0100, Ivo maffei wrote:
> In both cases, the most significant limb might not be zero.
> So, is this a bug or mpz_limbs_modify was never meant to zero the new limbs?
Note that not all *allocated* limbs are used, and I don't think
that unused limbs are required to be zero. See
16.1 Integer Internals
and _mp_size vs _mp_alloc.
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-discuss
mailing list