Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ginosko!uunet!kddlab!ccut!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.co.jp (Norman Diamond) Newsgroups: comp.std.c Subject: Re: %g format in printf Message-ID: <10832@riks.csl.sony.co.jp> Date: 13 Sep 89 10:06:06 GMT References: <1439@hiatus.dec.com> <19426@mimsy.UUCP> <1989Sep9.013233.9939@sq.sq.com> Reply-To: diamond@ws.sony.junet (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 18 In article <1989Sep9.013233.9939@sq.sq.com> msb@sq.com (Mark Brader) writes: >As for a value of 1024, of course "%.1g" of that should produce "1e3", >or rather, "1e+03". Why does the exponent "rather" have a leading zero? If the standard mandates (or even allows) this, it is the only place where it specifies a leading zero in a place where the programmer did not request it. (And if so, why not pad it with more leading zeroes, so that a machine that can handle exponents up to 75024 can say 1e+00003.) -- -- Norman Diamond, Sony Corporation (diamond@ws.sony.junet) The above opinions are inherited by your machine's init process (pid 1), after being disowned and orphaned. However, if you see this at Waterloo or Anterior, then their administrators must have approved of these opinions.