2 ms·
Decimal floating point is standardized since 2008: https://en.wikipedia.org/wiki/Decimal_floating_point#IEEE_754-2008_encoding https://en.wikipedia.org/wiki/De
by acqq 7y ago
Decimal floating point is standardized since 2008:
https://en.wikipedia.org/wiki/Decimal_floating_point#IEEE_754-2008_encoding https://en.wikipedia.org/wiki/Decimal_floating_point#IEEE_75...
But it's still not much used. E.g. for C++ it was proposed in 2012 for the first time
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3407.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n340...
then revised in 2014:
http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3871.html http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3871.ht...
...and... silence?
https://www.reddit.com/r/cpp/comments/8d59mr/any_update_on_the_decimal_proposal/ https://www.reddit.com/r/cpp/comments/8d59mr/any_update_on_t...
- gowld 7y agoIt's not important to most people, because decimal floating point only helps if your UI precision is exactly the same as your internal precision, which almost never happens. Seeing the occasional 0.300000000000004 is a good reminder that your 0.3858372895939229 isn't accurate either.
- acqq 7y ago> It's not important to most people One can argue that nothing is important to most people. The correct calculations involving money, up to the last cent, are in fact important for people who do them or who are supposed to use them. I've implemented them in the software I've made to preform some financial stuff even in eighties, in spite of all the software which used binary floating point routines. And, of course, from the computer manufacturers, at least IBM cares too: https://www.ibm.com/support/pages/decimal-floating-point-users-guide-technology-preview-advance-toolchain-ibm-xl-cc-linux-131 https://www.ibm.com/support/pages/decimal-floating-point-use... Apparently, there are even processors which supports these formats in hardware. It's just still not mainstream.