division bug in dc(1)
Mike Wescott
wescott at sauron.Columbia.NCR.COM
Thu Sep 8 03:26:50 AEST 1988
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 at gmdzi.UUCP (Gerd Woetzel) a year ago with a
fix by Heinrich Schueth (schue%gmdzi at 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 at ncrcae.Columbia.NCR.COM
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list