How boostorg/multiprecision works
Boost.Multiprecision is a header-only C++ library for extended-range integer, rational, floating-point, complex, and interval-style number types. A typical use configures a number type with a backend, performs arithmetic or mathematical operations, and consumes the resulting value through conversions or formatting. The README documents the generic interface and backend families; sampled source also shows benchmark components. Unsampled headers are represented at subsystem level, so their internal call relationships are not inferred.
Main entry points: number.hpp Number interface · miller_rabin_performance.hpp Miller–Rabin benchmark · cpp_bin_float.hpp Binary floats · cpp_int.hpp Arbitrary integers
Components 24
Generic Number API
- Number interface
include/boost/multiprecision/number.hpp - Backend concepts
include/boost/multiprecision/concepts/mp_number_archetypes.hpp - Expression operations
include/boost/multiprecision/detail/et_ops.hpp - Default operations
include/boost/multiprecision/detail/default_ops.hpp
Built-in Backends
- Arbitrary integers
include/boost/multiprecision/cpp_int.hpp - Decimal floats
include/boost/multiprecision/cpp_dec_float.hpp - Binary floats
include/boost/multiprecision/cpp_bin_float.hpp - Complex numbers
include/boost/multiprecision/cpp_complex.hpp - Rational numbers
include/boost/multiprecision/rational_adaptor.hpp
External Backends
- GMP backend
include/boost/multiprecision/gmp.hpp - MPFR backend
include/boost/multiprecision/mpfr.hpp - MPC backend
include/boost/multiprecision/mpc.hpp - TomMath backend
include/boost/multiprecision/tommath.hpp
Math and Interop
- Math functions
include/boost/multiprecision/detail/functions/trig.hpp - Random support
include/boost/multiprecision/random.hpp - Primality testing
include/boost/multiprecision/miller_rabin.hpp - Float formatting
include/boost/multiprecision/cpp_bin_float/io.hpp
Performance Benchmarks
- Arithmetic backend benchmark
performance/arithmetic_backend.hpp - Miller–Rabin benchmark
performance/miller_rabin_performance.hpp - Decimal-float benchmark
performance/performance_test_df.cpp - Benchmark support
performance/performance_test_df.hpp - Special-function benchmark
performance/sf_performance.hpp - Voronoi benchmark
performance/voronoi_performance.cpp
Other components
- C++ caller
Connections 24
- C++ caller → Number interface: configures and uses
README.md - Number interface → Backend concepts: accepts backend concepts
README.md - Number interface → Arbitrary integers: selects backend
README.md - Number interface → Decimal floats: selects backend
README.md - Number interface → Binary floats: selects backend
README.md - Number interface → Complex numbers: selects backend
README.md - Number interface → Rational numbers: selects backend
README.md - Number interface → GMP backend: selects backend
README.md - Number interface → MPFR backend: selects backend
README.md - Number interface → MPC backend: selects backend
README.md - Number interface → TomMath backend: selects backend
README.md - Number interface → Expression operations: supports expression templates
README.md - Number interface → Default operations: provides mathematical operations
README.md - Number interface → Math functions: supports transcendental functions
README.md - Number interface → Random support: supports random operations
- Number interface → Primality testing: supports primality testing
- Binary floats → Float formatting: formats values
include/boost/multiprecision/cpp_bin_float/io.hpp - Special-function benchmark → Arithmetic backend benchmark: includes backend
performance/sf_performance.hpp - Decimal-float benchmark → Benchmark support: includes support
performance/performance_test_df.cpp - Miller–Rabin benchmark → Primality testing: tests primality function
performance/miller_rabin_performance.hpp - Miller–Rabin benchmark → GMP backend: benchmarks backend
performance/miller_rabin_performance.hpp - Miller–Rabin benchmark → TomMath backend: benchmarks backend
performance/miller_rabin_performance.hpp - Miller–Rabin benchmark → Arbitrary integers: benchmarks backend
performance/miller_rabin_performance.hpp - Voronoi benchmark → Arithmetic backend benchmark: includes backend
performance/voronoi_performance.cpp