3 ms·
> If you're going to do a lot of fast floating point operations for something like graphics or neural networks, these errors are fine. Speed is more important t
by brazzy 7y ago
> If you're going to do a lot of fast floating point operations for something like graphics or neural networks, these errors are fine. Speed is more important than exact accuracy.
Um... that really depends. If you have an algorithm that is numerically unstable, these errors will quickly lead to a completely wrong result. Using a different type is not going to fix that, of course, and you need to fix the algorithm.
- maremp 7y agoFrom your description, I fail to understand how does it depend. You're saying that the algorithm is wrong, and changing the type doesn't help. If the type is not the issue, what difference does it make?
- justmedep 7y agoA single problem can be solved by using many different algorithms. However, even though algorithm A and B are "correct" they can behave differently when rounding errors are introduced. For example – if algorithm A uses https://en.wikipedia.org/wiki/Kahan_summation_algorithm https://en.wikipedia.org/wiki/Kahan_summation_algorithm and B uses naive summation then you can expect the end result of A to be more precise than the end result of B – even though both algorithms are correct.
- MaxBarraclough 7y ago> and B uses naive summation then you can expect the end result of A to be more precise than the end result of B – even though both algorithms are correct. Formally speaking, no. The problem can be defined precisely. At least one of the algorithms fails to solve the problem. In practice of course, some amount of error may be acceptable.