3 ms·
Surely that method of multiplication is not suited for larger numbers, to get 246 * 369 u do 200 * 300 200 * 60 200 * 9 40 * 300 40 * 60 40 * 9 6 * 300 6 * 60 6
by light3 16y ago
Surely that method of multiplication is not suited for larger numbers, to get 246 * 369 u do
200 * 300
200 * 60
200 * 9
40 * 300
40 * 60
40 * 9
6 * 300
6 * 60
6 * 9
So for x-digit multiplied by y-digit u need to write down x*y products and then sum it up, where as for the old method you need to only write down min(x,y) products and sum it up.
- hackerblues 16y agoThis is somewhat misleading. Yes, it's true if 3 * 123456789 counts as one multiplication. But if you're doing the 'old' version you implement it as 9 single digit multiplications: 3*9, 3*8,....,3*1 all written down with appropriate carrying. If you do it with the new method you again get 9 'single' digit multiplications: 3*9, 3*80, ..., 3*100000000 which you then add up. --- The old methods efficiency comes from writing the steps out in a compact notation, not from reducing the number of multiplications or additions.