3 ms·
>When reproducibility doesn't matter, If it doesn't matter, then high precision rarely matters either. Once you have results with unknown noise in them, and yo
by ChrisLomont 4y ago
>When reproducibility doesn't matter,
If it doesn't matter, then high precision rarely matters either. Once you have results with unknown noise in them, and you do a few operations on those, the noise compounds, at approximately sqrt(N) bits for N steps of computation (rough estimate, it certainly depends on algorithm selection, compiler nuances, stability of problem, etc.). So high precision degrades quickly when doing any work without using a reproducible and understood rounding mode.
>correct rounding is that it is the easiest mechanism to unlock reproducibility
Any rounding method works works for reproducibility - truncate, round to zero, Bankers rounding, etc., all (roughly) equivalently hard/easy to implement. However, pretty much none of these are possible without the ability to do correcting rounding first as a result of the Table Makers' Dilemma.
For example, Banker's rounding is generally better for doing computation than the usual correctly rounded. Knuth has some papers on this somewhere which are fascinating.
Also note most of the non-reproducible issues in numerical computation are compiler added - compile code with GCC version X, get one result, compile with later version, and results may change. Or across compilers. Negative 0, denormals, rounding modes, all need carefully dealt with. It can be done, but is not trivial. Keeping floating point solid is very, very tricky over compilers and time.
- adgjlsfhk1 4y agoNote that bankers rounding is a subset of correct rounding since bankers rounding only affects ties.
- stephencanon 4y ago> If it doesn't matter, then high precision rarely matters either. Once you have results with unknown noise in them, and you do a few operations on those, the noise compounds, at approximately sqrt(N) bits for N steps of computation (rough estimate, it certainly depends on algorithm selection, compiler nuances, stability of problem, etc.). So high precision degrades quickly when doing any work without using a reproducible and understood rounding mode. This isn't really true for any of the numerous numerical algorithms that satisfy backwards error bounds; there you would always prefer to have a well-rounded arithmetic at higher precision, if reproducibility is not required. > Any rounding method works works for reproducibility Only if you round _correctly_ in that direction. > Banker's rounding is generally better for doing computation than the usual correctly rounded. Banker's rounding _is_ the default IEEE 754 rounding mode.