Purpose: Multiply two large numbers (or polynomials) in by splitting each operand into parts. Karatsuba is the case ; Toom-3 () gives .

The Idea: evaluate, multiply, interpolate

Treat each operand as a polynomial in the split radix :

The product corresponds to , a polynomial of degree , hence determined by values. So:

  1. Evaluate and at small points, typically (where means β€œtake the leading coefficient”).
  2. Multiply pointwise β€” recursive multiplications of size .
  3. Interpolate to recover the coefficients of , by solving a small Vandermonde system with a fixed, precomputed sequence of additions, subtractions and small-constant divisions.
  4. Recompose: , propagating carries.

Complexity

NameExponent
2Karatsuba (Toom-2)
3Toom-3
4Toom-4
β€”, but the linear overhead explodes

The catch: the interpolation step’s constant grows rapidly with . Toom-4 needs many more additions and divisions than Toom-3, so the crossover keeps moving. Real libraries stop around Toom-4 or Toom-8 and switch to FFT.

The multiplication ladder (GMP-style thresholds)

Operand sizeMethod
< ~30 limbsschoolbook
~30 – 300Karatsuba
~300 – 1000Toom-3
~1000 – 3000Toom-4 / Toom-6.5 / Toom-8.5
> ~3000SchΓΆnhage-Strassen / FFT

Toom-3 worked out

Split into 3 parts, evaluate at :

Five recursive products , then a fixed sequence of ~10 additions and two exact divisions (by 2 and 3) recovers . Every division is exact, so no precision is lost.

The connection to FFT

Toom-Cook is evaluate-multiply-interpolate at a handful of small integer points. The FFT is the same three steps at roots of unity, where evaluation and interpolation themselves become instead of -with-a-huge-constant. Seeing them as one family is the useful insight.

Variants / Use Cases