?

This module uses native hardware precision. A double provides approximately 15–17 significant decimal digits — the same precision as any standard calculator or spreadsheet. There are no precision tiers to choose from; what you see is what the CPU computes.

Reference

  • Standard: ISO/IEC 14882:2023 (C++23)
  • Author: Bjarne Stroustrup
  • Documentation: cppreference.com

Unlike binary floating-point, numbers are stored in base 10 — meaning 0.1+0.2=0.3 exactly, with no rounding error.

Reference

  • Library: Boost.Multiprecision (cpp_dec_float)
  • Version: 1.87.0
  • License: BSL-1.0 (Boost Software License)
  • Author: John Maddock
  • Documentation: boost.org/multiprecision

Its distinguishing feature is exact rational arithmetic: 1/3 stays as the fraction 1/3, and 1/3*3=1 exactly — no rounding, no truncation.

Reference

  • Library: GMP (GNU Multiple Precision Arithmetic Library)
  • Version: 6.3.0
  • License: LGPL-3.0
  • Author: GNU Project
  • Documentation: gmplib.org

The interval module wraps every number in a guaranteed enclosure [lower, upper]. The true mathematical result is always contained within the interval bounds. This makes rounding errors visible and quantifiable instead of hidden.

Reference

  • Library: Boost.Numeric.Interval
  • Version: 1.87.0
  • License: BSL-1.0 (Boost Software License)
  • Author: Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
  • Documentation: boost.org/numeric/interval

The mpfr module provides high-precision binary floating-point and complex arithmetic using the MPFR and MPC libraries. It is the go-to module for scientific computing where you need many digits of precision with correctly-rounded results.

Reference

  • Library: MPFR (floats) + MPC (complex)
  • Version: MPFR 4.2.1 / MPC 1.3.1
  • License: LGPL-3.0
  • Author: GNU Project
  • Documentation: mpfr.org

The bin module provides high-precision binary floating-point and complex arithmetic using Boost.Multiprecision cpp_bin_float. It is a pure C++ alternative to mpfr — no external library required — with configurable decimal digit precision.

Reference

  • Library: Boost.Multiprecision (cpp_bin_float)
  • Version: 1.87.0
  • License: BSL-1.0 (Boost Software License)
  • Author: John Maddock
  • Documentation: boost.org — cpp_bin_float

The int module provides exact integer arithmetic at arbitrary or fixed precision using Boost.Multiprecision cpp_int. Every result is exact — no floating-point, no rounding, and no overflow for the arbitrary-precision type.

Reference

  • Library: Boost.Multiprecision (cpp_int)
  • Version: 1.87.0
  • License: BSL-1.0 (Boost Software License)
  • Author: John Maddock
  • Documentation: boost.org — cpp_int