This isn't quite right, but it seems better than rounding down. Experimented with a lower round up value, but none were right - the weighting must be more complex.