Content deleted Content added
Importing Wikidata short description: "Algorithm for integer multiplication" (Shortdesc helper) |
→Pseudocode: Clarify how the function split_at works |
||
Line 163:
Here is the pseudocode for this algorithm, using numbers represented in base ten. For the binary representation of integers, it suffices to replace everywhere 10 by 2.<ref>{{cite book |last= Weiss |first= Mark A. |date= 2005 |title= Data Structures and Algorithm Analysis in C++ |___location= |publisher= Addison-Wesley|page= 480|isbn= 0321375319}}</ref>
<syntaxhighlight lang="C">
Line 173:
m = min(size_base10(num1), size_base10(num2))
m2 = floor(m / 2)
/* m2 = ceil(m / 2) will also work */
/* Split the digit sequences in the middle. */
|