Re: Motion P1788/M007.01_NaI: Discussion period begins
On 2009-08-06 17:47:18 +0200, J. Wolff v. Gudenberg wrote:
> I try to avoid different uses of NaI. I think the only usage of NaI
> should be "illegal construction". The examples given by Vincent are
> for NaN not for NaI where we (will) have sqrt(-1) = emptyset
The "illegal construction" NaI is indeed the most important and general
one. I believe however that there should also be one for "domain error".
That is because in *some* uses of Interval Arithmetic, handling points
outside a function's domain as if they did not exist is not desirable,
whereas in other uses it is precisely the right thing to do. The Vienna
proposal tries to deal with this by recording domain errors in a sticky
flag and producing results according to the rule that points outside a
function's domain don't contribute to the result set -- but that may lead
to a lot of unnecessary calculations when NaI propagation would suffice.
Nate Hayes has repeatedly suggested a "two opcodes" approach to this, i.e.
support two versions of primitives and library functions, and I agree.
Whether the two versions should be bound to a single name (the selection
being made by an explicit or implicit-via-mode argument), or whether two
names should be exposed (as Vienna does for "forwards" and "backwards"
modes), is a separate question still to be discussed.
Michel.
---Sent: 2009-08-07 02:28:51 UTC