Re: Motion P1788/M007.01_NaI: Discussion period begins
On 2009-08-09 19:38:12 +0200, Jürgen Wolff v Gudenberg wrote:
> Arnold Neumaier schrieb:
> >The motion was for having a unique NaI, in which case the
> >propagation rule is OK.
> >
> >But I think there should either be no NaI (which I'd favor),
> >or there should be NaI with payload.
>
> what do you propose for illegal construction ?
> 1. return emptyset
> 2. return emptyset with payload
> 3. return emptyset and set a sticky flag
> 4. just set the flag
> 5. raise an exception
> 6. terminate
7. implementation defined.
8. undefined behavior (but an implementation is free to describe how
this is handled).
Contrary to a NaN in FP arithmetic, which can occur just because of
rounding errors, an illegal construction should never occur and is
seen as a programming error (unless there's some good reason, in
which case, the reason can tell what choice is the best one). That's
why undefined behavior can be acceptable (if you don't like undefined
behavior, choose a language with no undefined behavior), at least if
it can lead to more efficient code (in case interval arithmetic is
implemented in software).
Note: 5 and 6 may not be possible in all languages and/or on all
platforms.
> I think in section 2.3 remarks Vienna proposal favors option 2.
> which I consider equivalent to a unique NaI
It depends on what is required on NaI. The emptyset (even with a
payload) will disappear in a union operation.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)