Sputsoft Numbers is a C++ library for doing multiple-precision arithmetic. The library is header-only and highly portable, relying only on some boost libraries. It is possible, however, to obtain highly optimized code by choosing the GMP backend. This requires no code changes, but only setting a preprocessor macro and linking to the GMP library (see the documentation).
Design and Theory
The underlying theory and design can be found among the numbers project articles at the Sputsoft blog. The five latest post are listed here:
- Bitwise Operators and Negative Numbers
- Release: Sputsoft Numbers 0.2 (formerly SputArithmetic)
- Computing the Greatest Common Divisor
- Release: SputArithmetic 0.1
- Implementing Multiple-Precision Arithmetic, Part 2
License
The library is licensed under the very open Boost Software License.
Source Code and Downloading
The library consists of C++ headers only, so the source code is the library. The latest version can be downloaded or you can browse the source code.