GMP 4.4 remaining tasks
nisse at lysator.liu.se
Tue Dec 8 09:58:01 CET 2009
Torbjorn Granlund <tg at gmplib.org> writes:
> I suppose we could write a special mulmod_bnm1 for the degenerate case
> where 2bn < rn.
I don't think you need any interesting special handling for that case.
What happens is just that the top-level split into b mod (B^n + 1) and b
mod (B^n - 1) are nops, where the "normal" case needs an add and a sub.
Current code handles that (even though Marco has marked that handling as
(BTW, the normal case could use mpn_add_n_sub_n, at a cost of some more
temporary storage, but the current implementation doesn't do that).
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel