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

Re: A proposal for the next motion



> On 2009-05-13 13:18:27 -0400, Nate Hayes wrote:
>>> - Example. With these definitions
>>> xx*{0} = {0} and xx/{0} = Empty for any nonempty interval xx.
>>> - All interval functions used here are automatically defined for all
>>> arguments (e.g. sqrt([-1,4]) = [0,2], sqrt([-2,-1]) = Empty). It is
>>> left open what exceptional action may be taken by an implementation
>>> on evaluating ff(ss), when ff is an extension of a point function
>>> f, and ss is not a subset of D_f.
>>
>> These interpretations are not compatible with modal intervals.
>>
>> By default, they should be:
>>
>>     sqrt([-1,4]) = NaI
>>     sqrt([-2,-1]) = NaI
>>
>> where NaI simply means "undefined" or "invalid operation," so that
>> the NaI will be guaranteed to propagate through the remainder of a
>> lengthy computation.
>
> I disagree that one should get NaI in such cases. There may be a
> "possibly-invalid" flag either associated with the returned interval
> or global (to a block or whatever) to propagate this information if
> need be.

Global flags are technology from the 70's and don't work well in modern
multi-core, multi-threaded computing environments. It would be better to
have two opcodes: one that returns NaI by default and one that does the
c-set interpretation.

Alternatively, there can be one opcode with an immediate-mode argument or
attribute to specify which option to use.



>
>> If users are interested in the c-set conventions, they can explicitly
>> intersect the interval argument with the natural domain of the
>> function, i.e.:
>>
>>     sqrt([-1,4]&[0,+oo)) = sqrt([0,4]) = [0,2]
>>     sqrt([-2,-1]&[0,+oo)) = sqrt({empty}) = {empty}
>
> This is not acceptable. In particular, what would you do if the
> natural domain of the function is not an interval or is an interval
> having an endpoint that is not an exactly representable number?

For the mathematical functions likely to be included in a 1788 standard, the
natural domain can be represented by machine numbers. If a counter-example
really does exist, the two opcode solution mentioned above would be better
idea, I think.

Nate