mul_huge is a C library for multiplying huge integers that don't fit into your machine's RAM. The underlying integer arithmetic is performed by GMP. Auxiliary storage goes to disk. The inputs and output need not be stored on disk or in RAM, they can be generated and consumed on the fly in small chunks.

The largest example I've run so far is integers occupying 31 250 000 000 limbs, i.e. 233 GB, i.e. about 600 billion decimal digits, using 12 cores and 80GB RAM, peak disk usage about 1.8 TB, which took about 20 hours wall time (most of it spent on disk I/O).

mul_huge is released under a BSD-style license.

mul_huge has been in the news.

Source code

Latest version

Older versions

Back to the main page