bdiv vs redc

Niels Möller nisse at lysator.liu.se
Fri Jun 29 10:35:00 CEST 2012


Torbjorn Granlund <tg at gmplib.org> writes:

>     hi = mpn_addmul_1 (np, dp, dn, q)
>     hi += cy
>     cy = hi < cy		// can this be true?

Unless something interesting can be inferred from the hypothesis
"previous iteration generated a carry", I'm pretty sure carry is
possible here.

An addmul_1 with size n gives a result (including the carry limb) of up
to B^{n+1} - B,  or <B-1, B-1, ..., B-1, 0>.

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