%g format in printf
Bradford R. Daniels
daniels at grue.dec.com
Thu Sep 7 06:02:19 AEST 1989
> I have seen arguments on both sides of this, but only believe the one
> that says `the number of digits written is the number of significant
> digits'.
Ack. You're right. I hang my head in shame... How quickly we
forget the things we learn in high school. It should have been
obvious to me from the sentence "... style e (or E) will be used
only if the exponent ... is less than -4 or greater than or equal
to the precision."
BTW - Shouldn't the "only if" in that sentence be "if and only
if"? It seems like the way it is currently phrased you could
use f format in those cases if you want to.
- Brad
-----------------------------------------------------------------
Brad Daniels | Digital Equipment Corp. almost
DEC Software Devo | definitely wouldn't approve of
"VAX C RTL Whipping Boy" | anything I say here...
More information about the Comp.std.c
mailing list