min() for preventing overflow on integer unpremultiply