3 ms·
Decimal representations have one really minor advantage: they behave more the way people expect with respect to which numbers are exactly representable especial
by jsmith45 5y ago
Decimal representations have one really minor advantage: they behave more the way people expect with respect to which numbers are exactly representable especially in the size ranges of every-day numbers, since they exhibit mostly the same behavior as calculators do.
Plenty of people find that 0.2 not being exactly representable in binary floating point is not intuitive.
- deleted 5y ago[deleted]
- colejohnson66 5y agoIEEE-754 allows "decimal floats". Basically, instead of 2^exponent, it's 10^exponent. `decimal32`[0], `decimal64`[1], and `decimal128`[2] are defined. But I'm not aware of any popular system that implements them. [0]: https://en.wikipedia.org/wiki/Decimal32_floating-point_format https://en.wikipedia.org/wiki/Decimal32_floating-point_forma... [1]: https://en.wikipedia.org/wiki/Decimal64_floating-point_format https://en.wikipedia.org/wiki/Decimal64_floating-point_forma... [2]: https://en.wikipedia.org/wiki/Decimal128_floating-point_format https://en.wikipedia.org/wiki/Decimal128_floating-point_form...