rounding numbers in a set while keeping sum constant
Hello,
I am trying to round each of the numbers within the first list to an integer; however, I don't want the sum of each individual branch to change. So where this is a problem is in branch {4} (and others in my larger definition) where the sum of those numbers is 12 but when they are individually rounded to the nearest integer they happen to be rounded up so the new sum of the branch is 13.
In cases where this happens I would like to be able to add or subtract one from the largest number within the branch that needs to change to match its original sum. so in this case I would want {4}0 to be rounded to 6 and then have 1 subtracted from it but the other rounded numbers remain.
thanks,
- Michael -
Tags:
- Attachments:
-