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

Re: M0036.03 Flavors and standard invalidation



On 2012-09-06 21:10:56 +0200, Jürgen Wolff von Gudenberg wrote:
> Now with flavors but also possible without,  another kind of decorations
> indicating a state like "isKaucherInterval" enter the scene. I think they
> have to be recorded in addition to the operation based decoration. An
> interval is now a bare Interval and a set of  decorations.

This is a bit ambiguous. For the Kaucher interval [1,-1], there
are no corresponding bare intervals (except Empty). But the
standard could allow implementation-defined non-standard
intervals; there should be a sticky decoration (some form of NaI)
that would be set as soon as such a non-standard occur in a
computation, and the bare interval interpretation should be Empty.

Conversely, I think that an additional "defined-and-continuous"
decoration could be sufficient for a Kaucher arithmetic w.r.t.
unbounded intervals. If I understandard correctly, the problem
that should be avoided is the following.

In set-based arithmetic:

  X = [0,1]
  Y = 1 / X = 1 / [0,1] = [1,+inf]
  Z = 1 / Y = [0,1]

If I understandard correctly, in Kaucher arithmetic, one should
get NaI, more precisely:

  X = [0,1]
  Y = 1 / X = NaI
  Z = 1 / Y = NaI

Now, if there is a language-defined way (pragma...) to select the
bindings so that whenever the defined-and-continuous decoration is
false, the interval is changed to NaI, would this be OK for Kaucher
arithmetic?

For instance,

  #pragma Kaucher
  X = [0,1]
  Y = 1 / X
  Z = 1 / Y

would be interpreted as:

  X = [0,1]
  if (not is-bounded(X))
    X = NaI
  Y = 1 / X
  if (not defined-and-continuous(Y))
    Y = NaI
  Z = 1 / Y
  if (not defined-and-continuous(Z))
    Z = NaI

Note that the above code would be from language-defined specification,
not implementation. For efficiency, an implementation could recognize
the pragma and generate code accordingly (e.g. if it detects 0 in the
denominator interval, a NaI would be generated directly, without a
computation of the unbounded interval first).

This is a more restricted way of seeing flavors, but IMHO simpler in
its specification.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)