Re: Re: indeterminate expression
- To: mathgroup at smc.vnet.net
- Subject: [mg37665] Re: [mg37606] Re: indeterminate expression
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Fri, 8 Nov 2002 02:14:03 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I am not "strongly" against your suggestion, but I am wondering if
there may not be situation when someone would find it inconvenient.
For example, consider the following (admittedly rather contrived)
example. Suppose you have an expression p=a1^n1*a2^n2*... where all ai
and ni are functions of x. Setting x to 0 and checking that you get a
non-zero answer you can now conclude that a1,a2,a3 ... are all non-zero
at x=0. If 0^0 was 1 you would not longer be able to do that. What I
really mean to say is that 1 obtained as 0^0 may not for all purposes
be "as good" as 1 obtained in a more normal way. I am sure this sort
of problem would be rare but I suspect eventually someone would write
to the mathgroup to complain about it :)
Andrzej
On Thursday, November 7, 2002, at 03:05 PM, DWCantrell at aol.com wrote:
> In a message dated 11/06/2002 22:26:25 GMT Standard Time,
> andrzej at platon.c.u-tokyo.ac.jp writes:
>
>> I think it may not be such a good idea for a programming language to
>> always return 1 for 0^0.
>
> Allow me to clarify my position. Since this is a Mathematica newsgroup,
> I had assumed that, when I wrote 0, it was understood that I was not
> talking about 0.0 also. I suggest that 0^0 should be 1, just as
> previously.
> Furthermore, to clarify things, I also suggest that 0.0^0 should be 1
> but
> that 0^0.0 and 0.0^0.0 should be Indeterminate.
>
> Notes:
> (1) One of the computer algebra systems to which I had alluded earlier
> makes this very type of distinction, based upon whether the exponent
> is 0 or 0.0 .
> (2) Suggesting that the two latter expressions should be Indeterminate
> clearly goes against Kahan's position. He would have them be 1.0
> instead.
>
> Andrzej: Do you perhaps find my position, now that it has been made
> clearer, to be acceptable?
>
> Regards,
> David Cantrell
>
>> There are cases when 1 is the natural interpretation (as in the
>> original posting) but there are also cases when this sort of thing is
>> the result of something going wrong somewhere in one's input. If the
>> answer is always 1 then NumericQ[0^0]?@will be True and in general it
>> will be hard to catch this sort of error (when it is an error). So it
>> may be better to keep things as they are and resort instead to the
>> folowing simple idea:
>>
>> Define the function myPower:
>>
>>
>> myPower[0,0]=1;
>>
>> Now perform your computation inside Block as follows:
>>
>>
>> Block[{Power=myPower},expr]/.myPower->Power
>>
>> where expr is your expression involving 0^0 . I think this is
>> preferable to simply re-defining Power, although of course it is easy
>> enough to do that.
>
>> On Wednesday, November 6, 2002, at 08:54 PM, David W. Cantrell wrote:
>>
>>> "MH" <petronius at myrealbox.com> wrote:
>>>> Hi, as part of a long combinatoric code, I need to calculate lots of
>>>> p^n values. The problem arises when p=n=0. Such an expression
>>>> is indeterminate obviously,
>>>
>>> I agree with that statement _only_ because this newsgroup concerns
>>> Mathematica, in which 0^0 is indeed called Indeterminate. However,
>>> many
>>> mathematicians (including myself) take 0^0 to be 1. See, for example,
>>> the article "What is 0^0?" at
>>> <http://db.uwaterloo.ca/~alopez-o/math-faq/node40.html>.
>>> Furthermore, some other computer algebra systems (in this newsgroup,
>>> I'm not supposed to name them, if I understand correctly) consider
>>> 0^0
>>> to be 1.
>>>
>>> Note that of course the _limit form_ 0^0 is indeterminate. No
>>> question
>>> about that. But we are not concerned with a limit form here; rather,
>>> we
>>> are concerned with just the arithmetic expression 0^0.
>>>
>>>> but since it is part of a probability calculation, the probability
>>>> that something with 0 probability occuring 0 times
>>>> is 1. Is there a rule that I can specify that would allow me to
>>>> replace this indeterminate express with the answer that I want?
>>>
>>> As to this good question of yours, I'll defer to those more
>>> experienced
>>> with Mathematica. I'll be interested in their answers.
>>>
>>> Ultimately however, I would like to see 0^0 = 1 by default in
>>> Mathematica.
>
>
Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/