Re: Re: indeterminate expression
- To: mathgroup at smc.vnet.net
- Subject: [mg37654] Re: [mg37606] Re: indeterminate expression
- From: DWCantrell at aol.com
- Date: Thu, 7 Nov 2002 06:43:26 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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.