dynamic vs. static rounding

David Stewart uunet!thrain.anu.edu.au!des
Thu May 21 16:08:48 PDT 1992


	Bob Alverson <bobacolossus.tera.com> writes

> I reject the assumption that programmers want to mess with round modes
> at all.  Couldn't the primitives (interval_add, interval_multiply, etc.)
> be written in assembly (how complicated are they?) and provided as
> subroutines to the programmer? 

The routines for adding and multiplying intervals are relatively simple.
(But have you tried writing an ** efficient ** interval multiply routine?)

> .......  To write portable interval arithmetic, shouldn't
> one have a core set of primitives that encapsulate the basic operations?

What about interval overloading of sin, cos, tan, exp, log, j0, ....?
Polynomials are even messier, as it is desirable to use centred-difference
form. In interval arithmetic, the ** way ** you evaluate an expression is
even more crucial than for standard floating point arithmetic. e.g.

	[-1,+1] ^ 2 = [0,1]
	[-1,+1] * [-1,+1] = [-1,+1]

Do you really expect that every compiler writer will want to implement all
the extra operations to deal with intervals? If rounding modes are available,
then the people who are interested can write the necessary (portable)
libraries which anyone can use. I would think that it would be easier for
compiler writers to implement rounding modes/operations than to implement
a complete library of interval arithmetic operations. (I have never seen a
proposal for a complete standard set of interval arithmetic operations.
It would likely be large and contentious -- squaring functions would probably
need to be included as the above example illustrates.)

The idea of a standard library of interval arithmetic operations would still
be an excellent idea -- especially in C++. I just don't think that a
** complete ** set of operations which would entirely avoid the need/desire
for rounding modes is available.
------------------------------------------------------------------------
David Stewart			Program in Advanced Computation
desathrain.anu.edu.au		School of Mathematical Sciences
				Australian National University



More information about the Numeric-interest mailing list