5 ms·
I don't suppose they've considered making IEEE 754-2008 decimal floating point numbers the default number representation. It's a shame Intel didn't consult Dr.
by KMag 12y ago
I don't suppose they've considered making IEEE 754-2008 decimal floating point numbers the default number representation. It's a shame Intel didn't consult Dr. William Kahan earlier in their design of the x87 floating point unit. At this point, binary floating point is deeply entrenched despite most uses outside of scientific modeling being better suited to decimal floating point.
Most spreadsheet calculations are better suited to decimal floating point, and decimal floating point numbers are more intuitive for most users. A surprising number of the "Excel bugs" you find online are people misunderstanding binary floating point numbers, or some of the display hacks Excel uses to hide binary artifacts.
- rbonvall 12y agoThere's also DEC64, Douglas Crockford's proposal for a decimal floating point type to serve as the only numeric type in future programming languages: http://dec64.org/ http://dec64.org/
- KMag 12y agoPOWER and RISC-V processors already have hardware support for IEEE 754-2008 decimal floating point numbers, and C# has language support for IEEE 754-2008 decimal floating point. It seems the main claimed advantage of dec64 over IEEE 754-2008 decimal64 is in the fast-path zero-exponent case. Note that V8, SpiderMonkey, and many other dynamic language implementations use a separate compact fast-path representation of integers that renders this point moot. Also, no benchmarks are provided to show the supposed speed advantages of dec64 libraries over decimal64 libraries. Also, I doubt the dec64.org's claim that the primary reason for slow uptake of decimal64 is the speed of software implementations. In short, dec64 is mildly interesting, but its claimed advantages aren't enough to justify abandoning the decimal64 format that already has hardware support and language support in a very popular language. Intel also had a large role in standardizing the decimal64 format, so I suspect they'd be much more likely to implement decimal64 in hardware instead of dec64 in hardware. Edit: on a side note, it's unfortunate that neither dec64 nor decimal64 forces normalization, complicating comparison and sorting.
- syrnick 12y agoWe have :) It's pretty hard to use a custom floating point representation that isn't supported as a primitive type. To make the matters worse even the standard binary floating point number doesn't map to JSON. E.g. +/- Inf and NaN don't have JSON representation. We strive hard to provide intuitive user experience and abstract away the complexity of modern computing for non-technical users. At some point we might use a decimal floating point or better yet a fixed point decimal as the default representation for numbers.