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

Re: Motion 46: finalise interval literals, amendments



On 2013-06-28 12:09:47 +0100, John Pryce wrote:
> Siegfried had several stories from his own experience where users came to grief on this. I think this was one scenario:
> - The interval package was such that nums2interval(oo,oo) (no brackets, Jürgen!) returned Empty.
> - User was constructing interval xx = [a,b] as Union of nums2interval(a,a) and nums2interval(b,b). (I forget why, maybe that's how it had to be done in that package.)
> - This done for a sequence of b's getting bigger.
> - Eventually b overflowed and you had xx = Union([a,a],Empty) = [a,a] which is a containment failure.

I think this is a very particular user error. Note that Rump's scheme
wouldn't solve the problem if the user got a NaN (invalid operation[*])
instead of an overflow.

[*] A well-defined math expression can give that just due to rounding.

> Certainly this sort of thing can occur in practice. The interface
> between the floating-point and interval worlds has unavoidable
> hazards, and Siegfried wanted to minimise these hazards by adding
> this special case.

First the user could choose to do nums2interval(a,b) directly.
He still needs to check whether a and/or b is NaN. Or check NaI
generation.

Or perhaps NaI could be revised to be Entire instead of Empty.

-- 
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)