Division interfaces
Niels Möller
nisse at lysator.liu.se
Mon Feb 28 22:59:17 CET 2011
What are the current plans for retiring the divrem_1 interface? IIRC, we
agreed there should be an interface more or less like
mp_limb_t
div_qr_1 (mp_ptr qp, mp_limb_t *qh, mp_srcptr up, mp_size_t un,
mp_limb_t d);
and then preinv versions and separate functions for generating fraction
limbs.
It would be easier to commit my new div_qr_1 code after this interface
change (if it's going to happen, that is).
And then we have the issue of unnormalized divisors (it looks like
mpn_sbpi1_div_qr still requires that dp[dn-1] has the high bit set. I'm
afraid that's going to be a bit of work. I think the strategy should be
to normalize high limbs (the inputs to the 3/2 division) on the fly, and
then do the book-keping needed when doing the mpn_submul_1 calls with
unnormalized arguments.
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