http://www.perlmonks.org?node_id=785329


in reply to Re^4: accurately rounding numbers for percentages
in thread accurately rounding numbers for percentages

So do what ww said and simply put a disclaimer about the numbers being rounded and not necessarily adding up to 100%.

You can't introduce error to your numbers via rounding and then magically expect that error to disappear and have everything add up to 100 all the time. People are smart enough to understand rounding errors if you add a comment to that effect.

Gary Blackburn
Trained Killer