title: Karatsuba algorithm splitting number in 3 strings
body: <p>Im trying to code the Karatsuba algorithm with some changes. Instead of splitting each number into 2 strings, I want to split it into 3.</p>
  <p>For example:</p>
  <p><em><strong>Common Karatsuba</strong></em> -&gt; first number would goes into A and B. Second number would goes into C and D.</p>
  <pre><code>       A B
       x C D
  resulting...
      ac  ad+bc   bd
  </code></pre>
  <p>In order to implement it through recursive calls, majority of the codes do something like:</p>
  <pre><code>e = karatsuba(a,c)
  f = karatsuba(b,d)
  g = karatsuba(a+b,c+d)
  h = g-f-e //that's to get the 'ad+bc', since (a+b)(c+d) = ac+ad+bc+bd, then removing 'f' and 'e', we get just ad+bc
  </code></pre>
  <p>and finally...</p>
  <pre><code>return e*10ˆn + h*10^(n/2) + f;
  </code></pre>
  <p><em><strong>Karatsuba I want to implement</strong></em> -&gt; first number would goes into A, B and C. Second number would goes into D, E and F.</p>
  <pre><code>    A B C
    x D E F
  resulting...
   ad  ae+bd  af+be+cd  cf+ce  cf
  </code></pre>
  <p>However I have no idea how I can implement such thing through recursive calls, cause it seems much more complicated than the common way.</p>
  <p>Please help.</p>