LIBMPDEC++(3)
π LIBMPDEC++ π
okay bestie, welcome to the libmpdec++ page β this is the C++ glow-up of mpdecimal, and honestly? she's iconic. β¨
β¨ NAME β¨
libmpdec++ β literally version 4.0.1, no cap π
πΈ SYNOPSIS πΈ
C++ library for correctly rounded arbitrary precision decimal floating-point
arithmetic.
so yeah β it's a C++ library, and it does arbitrary precision decimal floating-point arithmetic, and it does it correctly rounded. that last part? that's the whole vibe. π₯
π¦ DESCRIPTION π¦
so libmpdec++ is part of mpdecimal, and she fully implements the General Decimal Arithmetic Specification. like, fully. not "mostly", not "kinda" β fully. periodt. π
here's where you go to read the spec itself, bestie, bookmark it:
https://speleotrove.com/decimal/decarith.html
now, the scope section of that spec says something very important, so listen up: this library conforms β with minor restrictions β to the IEEE 754-2008 Standard for Floating-Point Arithmetic... but only if the context is initialized with the appropriate parameters. π
β οΈ not me emphasizing this: with minor restrictions, and only when the context is set up with the appropriate parameters. no appropriate parameters, no conformance. that's the deal, fr fr. π
and depending on your distribution (everyone's setup is different, we love that for us), the complete HTML documentation is available either in the mpdecimal-doc package π or right here:
https://www.bytereef.org/mpdecimal/index.html
go read it. it's giving main character energy and you deserve the full lore. πβ¨
π SEE ALSO π
mpdecimal.3β the parent, the OG πlibmpdec.3β the C sibling, also slaying π
and that's the whole page bestie!! π«Ά this one's from the mpdecimal-4.0.1 era, dated 2025-05-01 β so if you're reading this, you're literally reading a classic. go forth and compute those decimals correctly, mwah πβ¨π
π¦ where this page comes from
- alpine 3.22: mpdecimal-doc 4.0.1-r0 Β· BSD-2-Clause
- alpine 3.23: mpdecimal-doc 4.0.1-r0 Β· BSD-2-Clause
- alpine 3.24: mpdecimal-doc 4.0.1-r0 Β· BSD-2-Clause
- arch rolling: mpdecimal 4.0.1-3 Β· BSD-2-Clause
- debian trixie: libmpdec++-dev 4.0.1-5 Β· BSD-2-Clause
- fedora 43: mpdecimal-devel 4.0.1-2.fc43 Β· BSD-2-Clause
- fedora 43: mpdecimal-devel 4.0.1-2.fc43 Β· BSD-2-Clause
- fedora 44: mpdecimal-devel 4.0.1-3.fc44 Β· BSD-2-Clause
- fedora 44: mpdecimal-devel 4.0.1-3.fc44 Β· BSD-2-Clause
- nixos 26.05: mpdecimal 4.0.1
- nixpkgs unstable: mpdecimal 4.0.1
- opensuse-leap 16.0: mpdecimal-devel 4.0.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: mpdecimal-devel 4.0.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: mpdecimal-devel 4.0.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: mpdecimal-devel 4.0.1-160000.2.2 Β· BSD-2-Clause
- ubuntu questing: libmpdec++-dev 4.0.1-5build1
- ubuntu resolute: libmpdec++-dev 4.0.1-6 Β· BSD-2-Clause
- ubuntu stonking: libmpdec++-dev 4.0.1-6 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms