3 ms·
Rounding can just as easily give you the wrong answer as truncating e.g: 100000...000000 199999...999999
by extension 15y ago
Rounding can just as easily give you the wrong answer as truncating e.g:
100000...000000
199999...999999
- ars 15y agoGood point. Hmm, I guess I would split the numbers in half, and sum each set of half's (making sure to set the exponent correctly). Then add the less significant half to the more significant half. i.e. basically add the numbers in order of magnitude. It doesn't have to be just two half's. Did anyone post this as a solution? I do remember learning this somewhere - it was a warning about loss of precision when adding lots of small numbers to a few large ones. And the solution was to do all the small numbers first. Seems like this would be a perfect place to teach this lesson. Do you know if this site does that?