🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #839

division bug in dc(1)

#839
From: Mike Wescott
Date: Wed, 07 Sep 1988 17:26
21 lines
1054 bytes
dc(1) returns some bogus values.  Try feeding this to dc.

10 k 3041280 d * 3041280.0000000001 / p

The vanilla 4.3BSD and 5.3.x dc return something like

3041280.0-4008922557  (note the bogus minus sign).

The correct value is something like 3041279.9999999999

The patch posted by woetzel@gmdzi.UUCP (Gerd Woetzel) a year ago with a
fix by Heinrich Schueth (schue%gmdzi@unido.UUCP) only partially fixes 
the problem.  The patched versions still yield garbage in this particular
test case:

3041280.0-4948737372

Has anyone fixed this yet?
-- 
	-Mike Wescott
	 mike.wescott@ncrcae.Columbia.NCR.COM
Technical Details
Message-ID: <1153@sauron.Columbia.NCR.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!gatech!ncsuvx!ece-csc!ncrcae!sauron!wescott

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!gatech!ncsuvx!ece-csc!ncrcae!sauron!wescott
From: wescott@sauron.Columbia.NCR.COM (Mike Wescott)
Newsgroups: comp.bugs.sys5,comp.bugs.4bsd
Subject: division bug in dc(1)
Message-ID: <1153@sauron.Columbia.NCR.COM>
Date: 7 Sep 88 17:26:50 GMT
Reply-To: wescott@sauron.Columbia.NCR.COM (Mike Wescott)
Organization: Entry Level Systems Development, NCR Corp., Columbia, SC
Lines: 21