LIBMPDEC(3)
π LIBMPDEC β bestie's guide to the decimal girlies β¨
okay so real talk, this is the libmpdec manual, third section of the manual, and the version we're vibing with rn is 4.0.1. that's it, that's the name. slay. π
πΈ SYNOPSIS πΈ
lowkey the whole thing in one sentence:
a C library for correctly rounded arbitrary precision decimal floating-point arithmetic. π
no cap, that's the entire vibe. she does decimal math, she does it big, and she rounds it correctly. iconic behavior honestly.
π¦ DESCRIPTION π¦
so. the libmpdec library is part of mpdecimal, and she fully implements the General Decimal Arithmetic Specification. like, not "mostly", not "kinda", fully. go off queen. the spec lives here if you wanna read the whole thing:
https://speleotrove.com/decimal/decarith.html
and here's the part that makes me feral: as described in the scope section of that spec, this library conforms β with minor restrictions β to the IEEE 754-2008 Standard for Floating-Point Arithmetic, if the context is initialized with the appropriate parameters. π₯
β οΈ bestie read that again: the IEEE 754-2008 conformity is conditional. context has to be initialized with the appropriate parameters first. don't skip that step, i'm begging. π
depending on your distribution, the complete HTML documentation is available either in the mpdecimal-doc package, or right here:
https://www.bytereef.org/mpdecimal/index.html
so like, whichever way your distro ships it, you're covered. π«Ά
π SEE ALSO π
mpdecimal.3libmpdec++.3
go read those too, i know you want to. iykyk. π
mwah π that's the whole page. this was mpdecimal-4.0.1, dated 2025-05-01, and she ate, no crumbs. bye bestie, go compute something enormous and perfectly rounded. πβπ
π¦ 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