3 ms·
Are there no calculations that would compound this error though? Where you use multiple circles, or conversions and the errors would grow?
by anothernewdude 4y ago
Are there no calculations that would compound this error though? Where you use multiple circles, or conversions and the errors would grow?
- kloch 4y agoRepeated summation can compound rounding errors and reduce the effective precision of floating point encoded numbers. Doubles have ~16 decimal digits of precision but adding a billion doubles together sequentially (simple summation) could with worst case data reduce your effective precision to only ~7 digits. Random data would tend to have a sqrt(n) effect which would leave you with ~11 digits. Several algorithms have been devised to reduce or even eliminate this effect. Kahan summation for example typically results in the precision loss of a single addition, effectively eliminating the compound errors. https://en.wikipedia.org/wiki/Kahan_summation_algorithm https://en.wikipedia.org/wiki/Kahan_summation_algorithm
- klodolph 4y agoYes, the error in floating point calculations compounds. However, you can figure out how fast it compounds, and there are different algorithms where it compounds at different rates. Generally speaking, if you think you need more than double precision, what you really want is double precision and a better algorithm. Generally speaking. Keep in mind that all of your actual measurements are going to be way less precise than double precision. Tools like LIGO can measure differences to better than double precision (1 part in 10^21, or something like that), but they're not actually making any measurements to that kind of precision, they're just measuring changes of that magnitude.
- mlyle 4y ago> Generally speaking, if you think you need more than double precision, what you really want is double precision and a better algorithm. Generally speaking. Though a lot of the time, the better algorithm is using an error accumulator-- so 2 doubles. This tends to outperform 80-bit extended precision, double-double, or long double arithmetic... but more precision would often also suffice and use the same amount of space.
- klodolph 4y agoError accumulation is basically a way to emulate higher precision numbers. That’s not what I’m talking about—I’m saying that you can use an algorithm which accumulates error at a lower rate to begin with. For example, if you are summing numbers, you can divide the numbers in half and recursively sum each half. This is superior, in terms of error, to a simple loop. If you are solving linear equations, you can calculate a matrix inverse—but this is awful in terms of error. Better idea is to use Gauss-Jordan elimination and back substitution. Better yet, use a pivoting. Better yet, factorize the matrix. Etc.
- mjburgess 4y agoThis is one of the frustrating elements in people who use this argument to say that computers can simulate abitary physical systems. OK, so simulate the 10^30 atoms in my table, give me their spatio-temporal evolution in structure under gravity, etc. etc. How much preicision in pi do you need, when you are compounding interactions of 10^30 atoms each tick? Basically infinite.