2 ms·
This is cool, but we can't seem to get floating point decimal jammed into languages. And that has an immediate business case. I would love to have floating po
by bsder 11y ago
This is cool, but we can't seem to get floating point decimal jammed into languages. And that has an immediate business case.
I would love to have floating point decimal on embedded systems rather than a binary floating point unit. But the libraries are generally huge.
I use the equivalent of decimals WAY more on embedded hardware. User entry is always decimal. Percentages--decimal. Time specifications--milliseconds, microseconds, nanoseconds--decimal with precision.
I wind up writing integer fixed-point arithmetic versions of this crap, over and over and over.
Maybe since Moore's law broke and memory transistors are now way more expensive that processor transistors, we'll get decimal floating point as a feature soon.
I won't hold my breath, though.
- dnautics 11y agoFixed-precision is much better for business uses. What, exactly is the benefit of floating point decimal? If you want to divide a $100 venmo three ways, you get to know that your 1/3 is carried to 12 decimal places instead of 2?
- bsder 11y agoFixed-precision is fine. Until your quantum isn't good enough. We only store to hundredths ... oops ... new regulations require us to decimal round to thousandths. Cue full reload of the database with all your numbers in them. Or, even better, try dealing with mm and mils in the same CAD database simultaneously. (conversion factor of 25.4--a clean number in decimal but very much not in binary) In addition, you forget that simply adding decimals doesn't work in binary floating point. Adding 0.10 10 times doesn't equal 1.00 in binary floating point no matter how much precision you use.