🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #529

Re: %g format in printf

#529
From: Chris Torek
Date: Wed, 06 Sep 1989 13:43
14 lines
1017 bytes
In article <1439@hiatus.dec.com> daniels@grue.dec.com (Bradford R. Daniels)
writes:
>Also, the definition of significant digits I learned in my high
>school science classes says that if I am asked to print out 1024
>with 1 significant digit, I should get 1000 printed out.  Is that
>correct?

No: `1000' has four significant digits (as does `1.000'); you need `1e3'.
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'.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris
Technical Details
Message-ID: <19426@mimsy.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris
References: <1439@hiatus.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.std.c
Subject: Re: %g format in printf
Message-ID: <19426@mimsy.UUCP>
Date: 6 Sep 89 13:43:21 GMT
References: <1439@hiatus.dec.com>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 14