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

Re: A Level 2 query



On 2013-06-21 13:02:11 -0700, G. William (Bill) Walster wrote:
> Baker,
> 
> As written, I believe that returning [0,0] for Z is a containment failure.
> 
> So, something would have to be done to make clear to the compiler if and
> when it has permission to optimize the statement
> 
> SUB = X - X
> 
> into
> 
> SUB = 0.0
> 
> provided, that is, that the value of the argument X in SUB is not [empty],
> in which case, SUB must return [empty].  If not, this in my view of things
> is also a containment failure because in my view, the interval [empty] is
> not the empty set.

I agree. If X is declared as an interval, the above "optimization"
is wrong. However a language or implementation may allow the user
to specify user-defined math functions (on real numbers) and have
an interval version of them. IMHO, the standard should allow that,
and the accuracy mode should be implementation-defined. How such
functions would be defined is out of scope of the standard.

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