Toom-Cook Multiplication Calculator

Multiply large integers using the Toom-Cook (Toom-3) algorithm.

Enter Numbers

Toom-3 Overview

1. Split each number into 3 parts

2. Evaluate polynomials at 5 points

3. Multiply pointwise (5 multiplications)

4. Interpolate to get result coefficients

5. Combine with appropriate powers

Evaluation Points

t = 0, 1, -1, 2, and infinity

These 5 points determine a degree-4 polynomial uniquely.

123456 × 789012

= 102,427,763,472

Complexity Comparison

Traditional O(n²)36
Karatsuba O(n^1.58)17.1
Toom-3 O(n^1.46)13.8

Step 1: Split (k=2)

x = 12·B² + 34·B + 56

y = 78·B² + 90·B + 12

where B = 10^2 = 100

Step 2: Evaluate & Multiply

tp(t)q(t)r(t)
05612672
110218018360
-13400
217250486688
inf1278936

Step 3: Interpolate

r₀ = 672

r₁ = 428

r₂ = 7572

r₃ = 8752

r₄ = 936

Step 4: Combine

Result = 102,427,763,472

Verification

Direct: 97,408,265,472

Results differ!