Extending the mpn interface
Niels Möller
nisse at lysator.liu.se
Thu Feb 28 12:45:18 CET 2013
bodrato at mail.dm.unipi.it writes:
> A comment about roinit...
> This function trusts the caller with regards to normalisation. I'm not
> sure I like this. I think we should:
> - normalize (same code as mpz_limbs_finish) before setting SIZ, or
> - add an ASSERT (xs == 0 || xp[ABS (xs)] != 0), and add a "normalize"
> function or macro to the documented interface.
I agree it makes sense to let this function do normalization.
We might want to have a public MPN_NORMALIZE anyway, but that's
a separate issue.
And MPN_ROINIT_N can't normalize, of course.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel
mailing list