Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!decwrl!shlump.nac.dec.com!hiatus.dec.com!grue.dec.com!daniels From: daniels@grue.dec.com (Bradford R. Daniels) Newsgroups: comp.std.c Subject: Re: %g format in printf Message-ID: <1442@hiatus.dec.com> Date: 6 Sep 89 20:02:19 GMT References: <19426@mimsy.UUCP> <1439@hiatus.dec.com> Sender: news@hiatus.dec.com Organization: Digital Equipment Corporation Lines: 20 > 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...