There are no rounding issues, You just round to an integer numbers, that means that if You have 5 values like these:
- 12,25%
- 13,25%
- 20,25%
- 30,25%
- 34,00%
after using round($x, 0)
on them they will be rounded to these values:
- 12
- 13
- 20
- 30
- 34
After summing these rounded values You get the value of 99.
It is best to round at least to two decimal places when working with percentages - and only for displaying purposes. You shouldn't round any values that will be used for further math operation...