Better non-power-two scaling