gmp_pi1_t
Niels Möller
nisse at lysator.liu.se
Sun Dec 13 22:41:51 CET 2009
Torbjorn Granlund <tg at gmplib.org> writes:
> I think a macro for that would be a good idea. Perhaps we could rename
> udiv_qrnnd_preinv along the same naming lines? (The to gmp-impl.h
> internal udiv_qrnnd_preinvN could probably be left with the old names.)
I have now checked in a macro udiv_qr_3by2,
/* Compute quotient the quotient and remainder for n / d. Requires d
>= B^2 / 2 and n < d B. di is the inverse
floor ((B^3 - 1) / (d0 + d1 B)) - B.
*/
#define udiv_qr_3by2(q, r1, r0, n2, n1, n0, d1, d0, di) \
...
and use it in mpn_sbpi1_div_qr. There are a couple of other places where
it should be used.
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