Content deleted Content added
No edit summary |
No edit summary |
||
Line 1:
HI IM T.J. SCHOLBHNERG! A '''multiplication algorithm''' is an [[algorithm]] (or method) to [[multiplication|multiply]] two numbers. Depending on the size of the numbers, different algorithms are in use.
lslslslasaldkifhgjaldkjghasdflkjghadflkjbvnadlk bvdfaa hi im t.j entries. Rather than first computing the products, and then adding them all together in a second phase, computers add the products to the result as soon as they are computed. Modern chips 64-[[bit]] numbers in [[hardware]] or in [[microcodewith ''m''-digit numbers ''x''<sub>1</sub>, ''x''<sub>2</sub>, ''y''<sub>1</sub> and ''y''<sub>2</sub>. The product is given by
: ''xy'' = ''x''<sub>1</sub>''y''<sub>1</sub> 10<sup>2''m''</sup> + (''x''<sub>1</sub>''y''<sub>2</sub> + ''x''<sub>2</sub>''y''<sub>1</sub>) 10<sup>''m''</sup> + ''x''<sub>2</sub>''y''<sub>2</sub>
so we need to quickly determine the numbers ''x''<sub>1</sub>''y''<sub>1</sub>, ''x''<sub>1</sub>''y''<sub>2</sub> + ''x''<sub>2</sub>''y''<sub>1</sub> and ''x''<sub>2</sub>''y''<sub>2</sub>. The heart of Karatsuba's method lies in the observation that this can be done with only three rather than four multiplications:
|