Actually it's printf.. (was Re: Another C compiler bug)
Owen Scott Medd
osm at ox.com
Tue Nov 13 11:57:53 AEST 1990
In many articles people complain about rounding errors with the Ultrix C
compiler...
> [ ad nauseum... ]
The problem is rounding up when there is a zero in the last displayed
digit. That is:
printf("%6.2f\n", .006) prints 0.00,
while printf("%6.2f\n", .016) prints 0.02
The internal representation is correct, just printf/*cvt are screwed up.
This is a *documented* bug in the Ultrix 4.0 (cc2.0) C compiler (right
there in the release notes) and an undocumented bug in the cc1.31
compiler. The Atlanta CSC *assures* me that it's fixed in the 4.1 cc,
though they have not followed through on their request (of a week ago!)
of getting me a rush copy of 4.1.
Sigh.
More information about the Comp.unix.ultrix
mailing list