5 ms·
I look forward to the end of the float / double. Having variable-sized mantissa and exponent fields, along with error tracking, we'll get rid of that baloney f
by natosaichek 11y ago
I look forward to the end of the float / double.
Having variable-sized mantissa and exponent fields, along with error tracking, we'll get rid of that baloney for real.
http://sites.ieee.org/scv-cs/files/2013/03/Right-SizingPrecision1.pdf http://sites.ieee.org/scv-cs/files/2013/03/Right-SizingPreci...
http://www.amazon.com/The-End-Error-Computing-Computational/dp/1482239868 http://www.amazon.com/The-End-Error-Computing-Computational/...
- marcosdumay 11y agoOk, so tell me, what is the "right size" that will make 0.1 + 0.2 == 0.3? Because, in binary, I don't think you'll be able to answer.
- xaduha 11y agoComputers are here to help us. Creating abstractions is the name of the game. "Technically correct" isn't the kind of correct we, as humans, want here. Plenty of languages get it right the way you would naively expect already, as shown here http://0.30000000000000004.com http://0.30000000000000004.com
- marcosdumay 11y agoThat's a completely different problem, and really, I have no idea why it cycling on the comments. Yes, some languages print floating point numbers in a friendly way by default (really if you are going with the default format, anything will do). In what way does it change equality tests?
- xaduha 11y agoNo only print, but store too. If the result is mathematically accurate, then what does it matter how it works inside? That's why we use abstractions, for convenience. Yes, there are trade-offs, but that's the price we should be willing to pay. https://en.wikipedia.org/wiki/DWIM https://en.wikipedia.org/wiki/DWIM
- haberman 11y agoIf you want to "get rid of that baloney," I think what you want is https://en.wikipedia.org/wiki/Decimal64_floating-point_format https://en.wikipedia.org/wiki/Decimal64_floating-point_forma... Rational arithmetic has some upsides also, but it also has some downsides.
- GFK_of_xmaspast 11y agoFloats/doubles aren't going anywhere until there's widespread hardware support for their replacements.