The IEEE-754 norm define decimal arithmetics in order to avoid rounding errors when using base-ten floating point numbers (see for example decimal64 on wikipedia). Is there a way to use this decimal arithmetics in C or C++?
TR 24733 specifies decimal floating-point math for C++, based on IEEE-754. The TR means that it's a technical report, so it's not part of the C++ standard. GCC says they have a partial implementation. There is currently a proposal in the works to add it to the C++ standard, but that's several years away at best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With