Wraparound multiplicaton vs mullo

Niels Möller nisse at lysator.liu.se
Fri Oct 23 14:19:54 CEST 2009


Torbjorn Granlund <tg at gmplib.org> writes:

> Could padding perhaps be made while recursing, not all at the beginning,
> at top-level to the left and later as needed the right?

Not easily, I think. For a typical call to mul 2^n-1, one first
wraps the input, then calls the 2^n-1 multiplication. And after
wrapping, one can't change to a different n.

Maybe one could change the interface to take large inputs input and a
minimum suggested n_min, and let the function chooses a suitable n >=
n_min and do the wrapping itself.

/Niels


More information about the gmp-devel mailing list