Correctly handle fractional digits.