|
Boost : |
From: Ivan Matek (libbooze_at_[hidden])
Date: 2025-01-18 14:03:39
On Thu, Jan 16, 2025 at 2:07â¯PM Matt Borland via Boost <
boost_at_[hidden]> wrote:
>
> The only update I found was
> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3407.html. I
> emailed Dietmar a while back to ask why it was never accepted, but I did
> not receive a response.
>
I found this SO answer, <https://stackoverflow.com/a/4689840/> quite
informative:
*I happened to be at the meeting where IBM initially proposed the decimal
types to WG14 and WG21. Their initial proposal was to provide them as
native types, which is pretty much the only solution in C. However, WG21
wasn't entirely convinced and pointed out that C++ already has
std::complex<> as a mathematical type in the library, so why not
std::decimal<>? Initial confusion about the performance overhead was
quickly ended when it was pointer out that std::decimal could obviously
wrap a _Decimal compiler extension.After poiting out that this could be
done in a library, the next question was then whether this should be in the
Standard library. It's after all a specialized domain in which this is
useful. The most commonly though-of domain, finance, doesn't actually need
it (they really need decimal fixed-point, not decimal floating point). IBM
didn't push their proposal a lot further, after this feedback.These types
do not resolve the issue of floating-point inaccuracy. 1/3 still isn't
representable. However, 1/5 is.*
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk