🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #582

Re: %g format in printf

#582
From: Norman Diamond
Date: Wed, 13 Sep 1989 10:06
18 lines
1337 bytes
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.
Technical Details
Message-ID: <10832@riks.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ginosko!uunet!kddlab!ccut!titcca!sragwa!wsgw!socslgw!diamond
References: <1439@hiatus.dec.com> <19426@mimsy.UUCP> <1989Sep9.013233.9939@sq.sq.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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