niedz., 12 paź 2025 o 17:32 Matt Borland <matt@mattborland.com> napisał(a):
Are there also IEEE 754 requirements or recommendations on what exponent a resulting decimal should have when you are adding decimals with different exponents?
Yes, Section 5.2 "Decimal Exponent Calculation" is what you're looking for.
Thank you. Anyway, I do not have access to IEEE 754. (Does anyone know if there are publicly available versions with similar content (like drafts of the C++ standard?) I have access to decarith. It makes sense to expect and provide the behavior where the default textual representation preserves precision: this is compatible with the main goal of the type. Precision and cohort retention are mutually exclusive Can you explain why? Anyway, this is such an important topic in the context of decimal types that it deserves an entry in the design decisions of the library. Whatever the decision, it needs to be explicit. Regards, &rzej;