safer rounding of integer