Re: General pow(xx,yy) function in Motion 10
> From: "Nate Hayes" <nh@xxxxxxxxxxxxxxxxx>
> To: "stds-1788" <stds-1788@xxxxxxxxxxxxxxxxx>
> Subject: Re: General pow(xx,yy) function in Motion 10
> Date: Sat, 5 Dec 2009 16:59:23 -0600
>
> Dan Zuras Intervals wrote:
> >> . . .
>
> In principle, I follow that reasoning.
>
> In practice, a particular scenario I have concern about is this:
>
> If I understand correctly, in a branch-and-bound algorithm when xx is
> negative the interval range will not contract even as the domain is
> bisected... at least until the domain is bisected to a singleton value
> (where it might be undefined). In either case, it is possible this could
> lead to stack overflow and system crash.
>
> With careful exception handling, I agree it should be possible to avoid such
> an outcome. However, this also requires foresight and planning on behalf of
> the unwary interval user. So is it really an improvement over requiring the
> user to choose ahead of time between exp(y*ln(x)) vs. powr(x,m,n), etc.?
>
> All else being equal, I suspect many interval users would choose general pow
> because they see it as being easy to use. But then be suprised that their
> branch-and-bound program crashed.
>
> Nate
On the contrary, the interval returned for pow(xx,yy)
WILL CONTRACT for each contraction of xx & yy.
And no crash will occur on a correctly written program.
It is just that it will not snap to any particular
manifold (positive or negative) until yy becomes a
singleton.
Then there are two possibilities: Either the solution
you seek is contained within the remaining manifold
when the exponent becomes a singleton or it does not.
If it does you will be able to identify it quite
narrowly in xx as well. If it does not then the
singleton is outside the desired solution space.
But your point is well taken.
If you know in advance that you seek a solution on a
particular manifold, then it should be possible to
track it down by an algorithm that contracts on that
manifold alone.
This is why I suggested two auxiliary functions should
be added to the library. One for each manifold.
Such functions would be able to narrowly contract on
a solution on the desired manifold if it is known
which manifold you seek.
As it is too late to amend this motion to include
those functions, perhaps you can propose them at
a later date.
Or I will propose them for you if you like.
But they do not form a issue as to the merits of this
motion except in so far as they would make things
easier to do.
Dan
P.S. - BTW, if you CANNOT identify which manifold
contains the solution you seek than the only pow
that is guaranteed to contain the desired solution
is the generalized pow. In this case, it is a lack
of information in the problem statement that limits
your knowledge of the solution, not a lack of skill
in your technique for finding it.