python-ballpark
python-ballpark copied to clipboard
consistent rounding
When rounding, optionally ensure that sum(round(values)) == round(sum(values))
by rounding some numbers in the opposite direction than the one dictated by convention. The rounding error should be minimized, e.g. prefer rounding down 42.5 over 42.9.