Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Undefined behaviour (Was: Definition of intervals as subsets...)



Gabriel Dos Reis wrote:
> We are dealing with computational mathematics.  I find it hard to
> believe that 'it does what it does' is an acceptable description
> in a standard for interval arithmetic.

All I was saying that there are circumstances where "undefined" or
"boundedly undefined" is the right thing to do.  They should be of
a kind that can be avoided by the programmer, so no harm is done.

Suppose the standard includes a computational method that applies
to vectors of intervals.  In practice those will be structures in
memory.  A full specification would have to cover the case where
the inputs overlap, or worse, overlap the result.  This *can* be
defined, e.g. by stating explicitly the sequence of memory accesses
that must be performed by the method (subject only to the "as if"
licence), but would that be useful?  It could be quite a burden on
the common case, and prevent vectorization.

Suppose we go whole-hog on reproducibility, and also include matrix
multiplication as a standard primitive, with the requiremenet that
the result must be the "tightest possible".  Of course, first there
is the small problem of defining tightness of an aggregate, as it is
often the case that tightness of some members can be traded for that
of another, so one would have to define a norm.  Then there may be
the problem that, to find the tightest, nearly all possible sequences
have to be tried and compared, leading to exponential complexity.
I'm not even sure quantum computers could help!  So we would again
have to fall back on an "as if" rule, possibly limiting the achievable
tightness, and making parallelisation rather difficult.

In other words, overspecification *is* something to watch out for.

Michel.
Sent: 2009-03-15 15:43:35 UTC