← All research

Knuth Algorithm D

What it is

Algorithm D (from TAOCP Vol. 2, §4.3.1) is the classic multi-precision long-division algorithm: divide a multi-limb dividend by a multi-limb divisor, one quotient digit at a time.

The tricky parts

Why it matters here

It’s the correctness baseline for emulated 64-bit division on 32-bit limbs in SIMD integer arithmetic. Faster methods like Barrett reduction are checked against it.

Integer arithmeticAlgorithms