Reference Link: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2849.pdf
I am trying to gather information about TR2 and how it relates to the upcoming C++ Standard, if it does at all.
Here are my questions so far. If I've missed any important questions, please answer those as well. :)
decimal32
, decimal64
, and decimal128
. decimal64
etc) going to be native to the language, or provided in a library?Your status is your social or professional position.
Status is our relative social position within a group, while a role is the part our society expects us to play in a given status. For example, a man may have the status of father in his family.
Status refers to a person's relative level of respectability and social honor. Weber's interest was particularly in status groups, which have distinct cultural dispositions and privileges, and whose members mostly socialize with one another. Power is the ability to do what one wants, regardless of the will of others.
circumstances. nounstate of affairs in one's life. assets.
FYI, the linked document isn't TR2. "TR2" refers to a set of library extensions, in the same style as TR1, while the draft for "decimal floating point arithmetic extensions" is just that. There is no TR2 draft yet and it was originally planned to come out after 0x. So from here on, I'll assume that you aren't asking about TR2, but the linked document.
std::decimal
which could easily wrap a native type provided by the platform/implementation. This TR does not define decimal literals.std::decimal::decimal32
, 64, and 128. Refer to the decimalN
links in the table here.
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.
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