Questions about NCEG

diamond@tkovoa diamond at tkou02.enet.dec.com
Mon Jun 4 11:17:34 AEST 1990


In article <1017 at s6.Morgan.COM> amull at Morgan.COM (Andrew P. Mullhaupt) writes:
|In article <15576 at bfmny0.BFM.COM>, tneff at bfmny0.BFM.COM (Tom Neff) writes:
|||"If the scaled value is in the range of representable values (for its
|||type) the result is either the nearest representable value, or the
|||larger or smaller representable value immediately adjacent to the
|||nearest representable value, chosen in an implementation-defined manner."
||Does anyone else think this word choice is strange?
|It looks to me like the standard (bless its soul) is making provision
|for stable rounding, (see also banker's rounding). See Knuth for
|details.

In fact most numerical engineers prefer stable rounding, in most cases
(i.e. not just bankers).  Unfortunately various other programming languages
and various other sorts of standards make this difficult.

Unfortunately, C errs in the opposite direction.  It would have been
better to say nothing about precision (as is done for arithmetic and
fprintf) than to encourage excessive carelessness.  The existing wording
really ought to be changed one way or another by the interpretation
committee.

-- 
Norman Diamond, Nihon DEC     diamond at tkou02.enet.dec.com
Proposed group comp.networks.load-reduction:  send your "yes" vote to /dev/null.



More information about the Comp.std.c mailing list