Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Integer Types

cpp_int
gmp_int
tom_int
Examples
Factorials
Bit Operations

The following back-ends provide integer arithmetic:

Backend Type

Header

Radix

Dependencies

Pros

Cons

cpp_int

boost/multiprecision/cpp_int.hpp

2

None

Very versatile, Boost licensed, all C++ integer type which support both arbitrary precision and fixed precision integer types.

Slower than GMP, though typically not as slow as libtommath

gmp_int

boost/multiprecision/gmp.hpp

2

GMP

Very fast and efficient back-end.

Dependency on GNU licensed GMP library.

tom_int

boost/multiprecision/tommath.hpp

2

libtommath

Public domain back-end with no licence restrictions.

Slower than GMP.


PrevUpHomeNext