4 ms·
There is Frink (http://futureboy.us/frinkdocs/ http://futureboy.us/frinkdocs/) which has interval arithmetic which seems so much more sane than floating point n
by renox 11y ago
There is Frink (http://futureboy.us/frinkdocs/ http://futureboy.us/frinkdocs/) which has interval arithmetic which seems so much more sane than floating point numbers..
- deleted 11y ago[deleted]
- Veedrac 11y agoI looked at Frink a little; it doesn't seem to implement integer-floating addition properly either. 9999999999999999999002 + 49.0 rounds to 9.9999999999999999990e+21, whereas the lesser value 9999999999999999999000 + 50.0 rounds to 9.9999999999999999991e+21. Plus, I'm not a fan of computing with decimal arithmetic, since it's less stable. For instance, min(a, b) <= (a + b) / 2 <= max(a, b) doesn't always hold for decimal floats, whereas it does for (non-overflowing) binary floats. Decimals are generally more prone to this kind of inaccuracy, since they lose more bits when the exponent changes. (Consider a = 1.00000000000000000001, b = 1.00000000000000000003.) Interval arithmetic support is cool, but not useful without effort - bounds like to grow. Plus, Python has bindings for them anyway ;).