Dynamic rounding modes are bunk <9101210403.AA11702adgh.Eng.Sun.COM>

Jim Valerio validgh!uunet!pzbaum.com!jimvaSun.COM
Wed Jan 23 22:51:44 PST 1991


With all due respect to those who know better than I....

Dynamic rounding modes are bunk.  I say this for 3 reasons:

1)  Every time I've used rounding modes in functions I've implemented,
    they were set to a constant value to force a particular rounding
    direction.  The only time a variable was used was when a previously
    saved mode was restored.

2)  On the converse side, I've never written code in that was intended
    to work differently when different rounding modes were in force that
    didn't explicitly set the rounding modes.

3)  I've never implemented an interval arithmetic library, which I was
    led to believe is the major reason directed rounding was put into
    the standard.  Why?  Because W. Kahan told me that in practice, it's
    so pessimistic that it's not useful.

The only advantage I've heard for dynamic rounding modes is to use them
to help detect unstable numeric computations.  The idea here is that if
you change the default rounding mode, re-run the program, and the results
are significantly different, then you've discovered something.  Of course,
failure of this "test" doesn't mean much.  Note this "test" only works
because so little code ever touches (I claim "considers" is the better
word) the rounding mode.

So what do I want?  That we dispense with dynamic rounding modes, and
statically compile rounding modes instead.  I claim that this will simplify
the coding of library functions, and will not penalize any currently used
or desired capabilities.

Counterexamples, anyone?

	Jim Valerio



More information about the Numeric-interest mailing list