a question
Torbjorn Granlund
tg at gmplib.org
Wed Feb 20 18:42:58 CET 2013
Your message is a bit vague, but I'll try to rely as well as I can.
So, you're using twos complement bignums. Is the n you mention fixed?
If not, how come you're interested in just n x n -> 2n multiply, it
seems you would need n x m -> mn multiply.
If n is just a word, there are some tricks of converting between signed
n x n -> 2n and unsigned dito. See GMP's longlong.h, somewhere not to
far from the end.
If n is arbitrary, I think it might be best to multiply the absolute
values.
--
Torbjörn
More information about the gmp-discuss
mailing list