Alan Stebbens wrote:
> I probably don't understand intervals well enough yet, but if
>
> x = new interval[-2,2] [-2,2]
>
> and
>
> x^2 [0, 4]
>
> then why doesn't abs[x] yield [0,2]?
Good question. The short answer is that I'm following the convention
for abs[x] that's defined in one of the seminal works on interval
arithmetic, Ramon Moore's 1979 book _Methods and Applications of
Interval Analysis_. See p. 10, (eq. 2.5) The definition is:
abs[x] = max[ abs[infimum[x]], abs[supremum[x]] ]
Which obviously gives a single scalar value, and not an interval.
That said, I never really liked the definition Moore gives, but I use
it because it was defined so early on that it's more or less become the
standard definition expected in many interval texts.
Even so, as I said, I'd tend to expect the definition that you cited
too. I rather doubt that too many people naturally *use* an abs[]
function that works in that somewhat non-useful way, unless they're
transliterating something written in one of the standard texts that
happens to use that odd definition for some reason.
I'll ask about this issue on one of the interval arithmetic lists.
Prof. Moore still inhabits one of those lists, and he may have changed
his mind in the intervening decades. I've discussed other interval
issues with him before. In any case, I'd be interested to hear his
justification for that definition, as the book doesn't discuss it any
farther than just giving the definition above.
I'd guess that implementations vary, and some people might have
broken this definition for a more useful one. I'm willing to change its
behavior to something more expected, again, as I doubt that it's useful
for too many people in its current form. It certainly could give
unexpected results when passing intervals into a program originally
intended for use with other numeric types, and those are the types of
issues I'd like to avoid.
> And, if one uses intervals with mean values:
>
> y = new interval[-2, 0, 2]
> [-2, 0, 2]
> abs[y]
> 2
> abs[y+2]
> 4
The middle value is completely ignored and lost with the current
definition. Another reason to revise and improve it.
> what happened to the abs[] on the lower bound of the interva?
Hopefully, this is explained by the definition I cited above. I'm
not saying it's the result one might *expect*, but it's a definition
with a long history.
I'll keep you posted. Anyone with strong opinions on this?
--
Alan Eliasen | "Furious activity is no substitute
eliasen@... | for understanding."
http://futureboy.us/ | --H.H. Williams