Donn Terry said:
> You've partially rewritten this as a bulleted list, and it did get
> clearer.
Though I did so using an example case; that text is *not* general enough.
I've just tried to rewrite the text, and I'm not happy with the result.
The most change I would be happy with is the following:
The double argument representing a floating-point number shall be
converted in the style f or e (or in the style F or E in the case of
a G conversion specifier), with the precision specifying the number
- of significant digits. Let P equal the precision if non-zero, 6 if
+ of significant digits, using the following method.
+ * Let P equal the precision if non-zero, 6 if
the precision is omitted, or 1 if the precision is zero.
- Then, if a
- conversion with style E would have an exponent of X:
+ * The implementation shall determine what the exponent would have been
+ if the same value was converted with style E; let X be this exponent.
- if P > X >= -4, the conversion shall be with style f (or F) and
precision P - (X+1)
- otherwise, the conversion shall be with style e (or E) and
precision P - 1 .
- Finally, unless the # flag is used, any trailing zeros shall be
+ Finally, if the # flag is not used, any trailing zeros shall be
removed from the fractional portion of the result and the decimal-point
character shall be removed if there is no fractional portion remaining.
--
Clive D.W. Feather | Work: <yyyyy@xxxxxxxxx> | Tel: +44 20 8495 6138
Internet Expert | Home: <yyyyy@xxxxxxxxxx> | Fax: +44 870 051 9937
Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc | |
|