Russian peasant multiplication
Oskar Wieland
oskar.wieland at gmx.de
Sat Feb 22 12:43:46 UTC 2014
Hi,
isn't the Russian peasant multiplication not to prefer against the
grammar school method in <mpn/generic/mul_basecase.c>?
http://en.wikipedia.org/wiki/Ancient_Egyptian_multiplication#Russian_peasant_multiplication
For every step there is only:
one left shift
one right shift
one addition (odd numbers only)
This might be an O(log N) algorithm...
Greetings
O2k4r
More information about the gmp-discuss
mailing list