3 ms·
You don't need to work with atomic particles to get into problems with floating point accuracy. A badly conditioned matrix can be enough. Yes, you can use floa
by amelius 2y ago
You don't need to work with atomic particles to get into problems with floating point accuracy. A badly conditioned matrix can be enough.
Yes, you can use floats to build floats with more precision, but that's not the point. The point is to have correctness at your fingertips, rather than a datatype that comes with lots of caveats.
I agree with you that people who work with numerical algorithms might want to use floats, but programming languages with a general audience probably should have an arbitrary-precision datatype as a default.
- AlotOfReading 2y agoMy point is that rationals aren't correct in the way you're describing. For example, try rotating that rational ill-conditioned matrix. You'll probably have to pick a precision to approximate the result and at that point you would have been better off with arbitrary precision floating point, algebraic or symbolic representations instead. None of these representations are wrong, they're simply tradeoffs for different usages. That's why IEEE floats are such a good default. They balance those tradeoffs extremely well, with fixed semantics and near-universal hardware support.