MPDECIMAL(3)
π MPDECIMAL(3) π
okay bestie, welcome to the mpdecimal page β it lives in the Programmer's Manual, and it's the whole vibe for C/C++ libraries that do arbitrary precision decimal floating-point arithmetic, and do it correctly rounded. no cap. π
β¨ NAME β¨
mpdecimal β version 4.0.1 π
β¨ SYNOPSIS β¨
C/C++ libraries for correctly rounded arbitrary precision decimal floating-
point arithmetic.
likeβ¦ that's it. that's the whole pitch. and it ate. π¦
β¨ DESCRIPTION β¨
so the tea is this: libmpdec and libmpdec++ fully implement the General Decimal Arithmetic Specification. if you wanna read the source material (and honestly, main character energy of you), it's right here:
https://speleotrove.com/decimal/decarith.html
and per the scope section of that spec β with minor restrictions, ok, don't come for me β these libraries conform to the IEEE 754-2008 Standard for Floating-Point Arithmetic if you initialize the context with the appropriate parameters. yes, that part matters. it's giving "read the docs first, babe". π
depending on your distribution, the full HTML documentation is available in the mpdecimal-doc package, or over here:
https://www.bytereef.org/mpdecimal/index.html
ngl if you skip the docs and then something surprises you, that's between you and the context parameters. π
β¨ SEE ALSO β¨
libmpdec.3libmpdec++.3
mpdecimal version 4.0.1, dated 2025-05-01 β that's the whole page, bestie. go be iconic with your decimals. π«ΆπΈβ¨
π¦ 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