[E-Lang] Operators #6: Multiplicative operators

hal@finney.org hal@finney.org
Tue, 1 May 2001 10:42:50 -0700


Alan Karp, <alan_karp@hp.com> writes:
> > From: shap@cs.jhu.edu [mailto:shap@cs.jhu.edu]
> > In any case, Hal's memory is consistent with my memory of that
> > discussion -- given a choice between two rounding modes, the one that
> > requires less precision is better. Remember that floating point space is
> > not real numbers -- it's a weird sort of tumbler space, so precision
> > matters.
>
> I don't understand the comment about "requires less precision is better".
> Truncation (round to zero) requires less precision (no sticky bit needed),
> but is worse than round to nearest.

To clarify, when we are discussing the IEEE "round to even" rule, that
is only in the case when there is a tie.  Round to nearest is the best
rule in general.  But when there is a tie and the result is exactly
halfway between two representable values, round to nearest is ambiguous.
In that case you need an additional rule, either round to even, round
to odd, round up or round down.

> Of course, none of this has anything to do with the choice of round to
> nearest even or nearest odd.  I'm still trying to track that one down.

The point is that breaking ties via "round to even" produces a result
which requires less precision, which supposedly is advantageous for
subsequent steps in the calculation (although I don't know if this can be
proven rigorously).  The matter is discussed in Knuth volume 2 section
4.2.2 (in my old 2nd edition).  Here is a pointer to a very abbreviated
summary: http://www.ens.gu.edu.au/robertk/R/help/00b/1329.html

Hal