Decimal Goes Back to Review
Oct 6, 2025We are excited to announce that the Decimal (https://github.com/cppalliance/decimal) library is going back to review for inclusion in Boost from 06 to 15 October. In preparation for this we have made quite a few changes since the indeterminate end of the first review about 9 months ago:
Breaking Changes:
- Based on bitwise comparisons with other similar libraries and database software, we have changed the internal encoding of our IEEE 754-compliant types
- We spent about 3 months optimizing just back end integer types that are now used throughout the library, and as the internals of decimal128_t
- We have changed the type names to better match conventions:
decimalXX
is nowdecimalXX_t
decimalXX_fast
is nowdecimal_fastXX_t
- The headers have been similarly renamed (e.g. decimal32.hpp -> decimal32_t.hpp), and can now be used independently instead of requiring the monolith based on feedback in Review
- Constructors have been simplified to reduce confusion (no more double negative logic)
- The default rounding mode has changed to align with IEEE 754, with rounding bugs being squashed across the modes as well
Other Changes:
- The documenation content has been overhauled thanks to feedback from Peter Turcan and others during the first review
- The docs are no longer a single long page of Asciidoc; we have moved to Antora. Thanks to Joaquín and Christian for making it trivial to copy from Unordered to make that happen.
- https://develop.decimal.cpp.al/
- We now support formatting with {fmt}
- Benchmarks have been expanded to include GCC
_DecimalXX
types, and Intel’s libbid. I think people should be pleased with the results now, since that was a huge point of contention at the end of the review - We have added support for CMake pkg config for ease of use
- Every post-review issue John was kind enough to consolidate and open have been addressed: https://github.com/cppalliance/decimal/issues?q=is%3Aissue%20state%3Aclosed%20label%3A%22Boost%20Review%22
Continued Developments:
-
I think the only unaddressed comment from the first review is support for hardware decimal floating point types. There are a few rarer architectures that have native decimal floating point units like POWER10. Is it possible to fully integrate these native types for use in the library? Armed with a compiler farm account I have begun developing a wrapper around the native types that seems to work. Stay tuned.
-
One item that we have considered, but have not put any effort into yet would be getting the library running on CUDA platforms. If this is a feature that you are interested in, please let us know!
-
As is always the case with Boost reviews, regardless of the outcome I am sure that we will receive lots of feedback on how to improve the library.
If you are interested, much of the contents of the first review can be found in the original thread on the boost mailing list archive: https://lists.boost.org/archives/list/[email protected]/thread/AGFOQZMJ4HKKQ5C5XDDKNJ3VJL72YTWL/
All Posts by This Author
- 10/06/2025 Decimal Goes Back to Review
- 07/14/2025 Bigger, Faster, Stronger Types
- 04/14/2025 Looking at the Numbers
- 01/10/2025 Another new library underway
- 10/21/2024 CUDA comes to Math
- 07/08/2024 Matt's Q2 2024 Update
- 04/22/2024 Matt's Q1 2024 Update
- 01/10/2024 Matt's Q4 2023 Update
- 10/27/2023 Matt's Q3 2023 Update
- View All Posts...