Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
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.0provided, 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.
BTW, the first line of the Function should be INTERVAL FUNCTION SUB(X)I currently don't have access to Sun's compiler, or I would have compiled and tested this. :(
So, whatever a language does or does not do must preclude containment failures.
That for me is the bottom line.I would like the standard to per as permissive as feasible to allow as much creativity as possible on the part of interval compiler and library developers.
Cheers, Bill On 6/21/13 6:09 AM, Ralph Baker Kearfott wrote:
Bill, Richard, On 06/20/2013 11:09 AM, G. William (Bill) Walster wrote:Suppose you have the function SUB(X) INTERVAL X SUB = X-X RETURN and in the calling program INTERVAL X X = [-1,1] Y = X-X Z = SUB(X) PRINT, X, Y, Z ENDDo you expect to get [0,0] for Z and [-2,2] for Y? Isn't that what your "without dependency slop" remark implies?If so, then the standard should make it very clear that interval arguments of functions are to be evaluated differently from regular interval variables.Is such a specification within the scope of our arithmetic standard, is it only within the scope of a language standard, is it something our arithmetic standard shouldsay about a language standard claiming to use the arithmetic standard, or is it something else? Baker