Setup

Choose K primes p_i with ∏p_i > possible result. Each machine word.

Advertisement

Per-prime computation

Run algorithm mod each p_i separately. All arithmetic in native ints. K× overhead.

Advertisement

Reconstruction

CRT combines K residues into single big integer. Or into result if bound is known.