fixed rounding for some perl versions