4 ms·
Are you sure that would give the same result? The first thing that struck me about this challenge is that there's going to be floating point precision issues.
by vintermann 3y ago
Are you sure that would give the same result? The first thing that struck me about this challenge is that there's going to be floating point precision issues.
- londons_explore 3y agoAll the data is only to one decimal place. You can shift the decimal place and do the whole thing with int's and get a 100% precise result.
- vintermann 3y agoYou can, but will it be the same result? :) binary floating point can't represent 0.1 or 0.2 exactly. To be fair, with only additions, and only a billion of them, you're probably fine working in floating point and rounding to one decimal in the end.
- bmicraft 3y agoJust x10 it and count in integers?
- vintermann 3y agoI said that works here. The point is that floating point may give a different answer.