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 πŸ’–βœ¨πŸŽ€