Assuming I have some values (representing shares of some total amount) that sum up exactly to 100
, e.g.:
13.44500
35.35500
40.39877
10.80123
If I round them to two decimal places I get the following values that do no longer sum up to 100
, but instead sum up to 100.01
13.45
35.36
40.40
10.80
I know that rounding discards information, but I always thought that since we discard information from each number in the same way, the sum should not change. Therefore my questions are:
- What are the mathematical properties of rounding?
- Why do the rounded values sum up to something different than the original ones?
- What is the best practice to display these values and the sum to a user, when I can only show two decimal places both of the values and the sum? Since the underlying data sums up to
100
I do not want to display values that sum up to something different.