interval sqrt and pow exceptions

Arnold Neumaier neumacma.univie.ac.at
Fri Jan 16 03:41:21 PST 1998


David G Hough writes:



>>sqrt([-1,d]) = sqrt([-1,0)] U sqrt([0,d]), leading to the possibilities
        [0,sqrt(d)]
        C*
        NaI
usually with some kind of exception-occurred status as well.<<

There is something essentially wrong if not sqrt([-1,d])=[0,sqrt(d)],
since then users don't get the maximal information about the result
but only an untelling symbol. In every single real application I know of
and can imagine unsophisticated users are likely to use, [0,sqrt(d)]
is precisely the answer required. Unsophisticated users in a global
optimization application, for example, write their interval expressions
just as they would write it in real arithmetic, and because
	Y=sqrt(1+X+X^4) 	(1)
works for all real numbers without problems, no one
would expect that they might have problems with intervals.
But (1) is completely inadequate with David Hough's alternatives
since it results for X=[-2,2] in
Y=sqrt(1+[-2,2]+[0,16])=sqrt([-1,19])=NaI or C*,
ruining any enclosure and causing problems in a branch and bound
context. Thus they have to write instead of (1) the assignment 
	Y=sqrt(max(1+X+X^4))	(2)
as David Hough suggests by analogy to the IEEE standard discussions.
But the example shows that the arguments now work in precisely the
opposite way; to safeguard simple users, the answer [0,sqrt(d)]
must be the default, and sophisticated users can look at the
exception status to find out what they need.





>>Even more interesting are cases like
        [-2.0,-2.0] ** [0.3,2.7]
that really bring the exception issues in point x**y into sharp focus.  
Is it really right to evaluate that interval expression as the convex hull of
        ([-2.0,-2.0]) ** 1 U ([-2.0,-2.0]) ** 2       ?<<

To handle this correctly, it is sufficient that one forbids interval
exponents and real nonrational exponents in interval expressions.
Users will get an error at compile time and can change any incriminated
x**y to exp(y*log(x)) if they desire the solution favored by 
David Hough (>>I'm beginning to think that floating-point x**y with 
negative x should just be an invalid exception<<) or to a more
complicated expression should they intend something else. This is
the clean solution that does not require the computer manufacturer to 
read the users' mind.





Arnold Neumaier





More information about the Numeric-interest mailing list