3 ms·
Intuitively: 1e100 + 1e-100 = 1e100 Because of rounding error. (This is true for some sufficiently large and small exponent.)
by hedora 8y ago
Intuitively:
1e100 + 1e-100 = 1e100
Because of rounding error.
(This is true for some sufficiently large and small exponent.)
- FabHK 8y agoYou don't need to go that far: julia> 1e16 + 1 == 1e16 true julia> 1e19 + 1000 == 1e19 true
- thaumasiotes 8y agoSo what? That's true regardless of whether you add small numbers in before or after the big one. If you have a lot of small numbers that add to 1e-2, and a couple of big numbers that add to 1e+200, it is totally irrelevant what order you add the numbers in, because all of the small numbers together have exactly zero influence on the sum. But we're talking about cases where the sum of the small numbers is large enough to be detectable when measured against the large numbers, even if no individual small number is that large.