In article <[EMAIL PROTECTED]>,
 "Terry Reedy" <[EMAIL PROTECTED]> wrote:

> "Mark Dickinson" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> On May 11, 9:36 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> |> Do you have in mind any situations in which it is advantageous to have 
> 0**0
> |> undefined?
> 
> | (Playing devil's advocate here.) If you regard x**y as exp(y*log(x))
> 
> Which, of course, I was not, but for the sake of discussion....
> 
> | then it's not at all clear that 0.**0. should be considered well-defined.
> 
> Then it seems equally dubious that 0.**y, y>0, should be well-defined.
> It seems to me that lim as x goes to 0. exp(y*log(x)) is equally well 
> defined whether y is 0 or not, even though there is a discontinuity in the 
> limit.

Huh?  That "discontinuity" is the problem.  Actually, the problem is 
that the function f(x,y)=x**y=exp(y*ln(x)) will be double valued at x=0 
and y=0.  It's value will depend on the direction in which the limit 
approaches (x,y)=(0,0).  You cannot have a function that has two values 
at one domain point without adding branch cuts (see complex functions 
like ln(z), z is complex).  That's not well defined -- in your sense.  
You are choosing a branch cut and you must make sure the rest of your 
math and code are consistent with that.  You should also tell any users 
of your code about that decision.

-- 
-- Lou Pecora
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to