Parse the precision.
Make str output consistent with formatting for infinities and nans.
Remove extraneous line.
Remove special case for precision one; it's not needed.
Make presentation of exponent consistent: always use >= 2 digits.