Mail Archives: djgpp/1998/03/01/21:00:26
Ned Ulbricht wrote:
> The Working Draft, 97-11-21, WG14/N794 J11/97-158, p.290 (&cf p.287),
> seems to be a little bit ambiguous about this, but it says under 'g,G'
> "the number is converted in style f or e (...), with the precision
> specifying the number of significant digits." I interpret the "with"
> as
> saying that the g,G format always applies its own semantics to
> precision
> irrespective of the "style" used for the output. I.e. it consistently
> takes over the meaning of precision.
>
> I can read K&RII either way, so no help there...
Why not look at the _actual_ ANSI document? From ANSI 7.9.6.1:
The double argument is converted in style f or e (or in style E in
the case of a G conversion specifier), with the precision specifying
the number of significant digits. If the precision is zero, it is
taken as 1.
And for f:
... If the precision is missing, it is taken as 6 ...
And for e, E:
... if the precision is missing, it is taken as 6 ...
Seems pretty clear to me.
--
Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
Alcyone Systems / http://www.alcyone.com/max/
San Jose, California, United States / icbm://+37.20.07/-121.53.38
\
"I've got the fever for the / flavor of a cracker"
/ Ice Cube
- Raw text -