def round_int(dec): """Round float to nearest int using expected rounding.""" return int(decimal.Decimal(dec).quantize(decimal.Decimal('0'), decimal.ROUND_HALF_UP))