 
 
 
 
 
 
Re: What we get from (0.0*x), (0.0^x) and similar stuff
- To: mathgroup at smc.vnet.net
- Subject: [mg58821] Re: What we get from (0.0*x), (0.0^x) and similar stuff
- From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
- Date: Wed, 20 Jul 2005 00:29:20 -0400 (EDT)
- References: <dbidbr$bk3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
ted.ersek at tqci.net wrote:
> I think some of the code I sent in my last message on this subject was a
> bad idea. My current thoughts on this subject are summarized below.
> ------------------------------
>
> I like what I get from the next line. If a user wants to ignore the fact
> that certain values will give (0^0) or (0*Infinity) they can add
> definitions to do what they want. If a user wants (0^x) to return
> If[x==0,Indeterminate,1] they can add a definition to do that.
If you were thinking about my previous response when you said that,
please note that I was clearly talking about x^0, rather than 0^x,
when I mentioned If[x==0, Indeterminate, 1].
> In[1]:=
>  Clear[x,y];
>  {0^x,0.0^x,0.0*x*y}
>
> Out[2]=
>  {0^x, 0.x, 0. x y}
Surely you meant {0^x, 0.^x, 0. x y}.
> ------------------------------
> The next line should return the approximate number 0.
Should it? Given only that az is approximately zero and
-Infinity < x < Infinity, the product az*x could potentially be large.
I suggest that 0. x is the correct thing to return.
> In[3]:=
>  FullSimplify[ 0.0*x, -Infinity < x < Infinity ]
>
> Out[3]=
>  0. x
>
> -------------------------------
> (0^-2) and (0.0^-2) return ComplexInfinity.  Shouldn't the next line
> return {ComplexInfinity, ComplexInfinity}.
Yes and no, resp., IMO. See below.
> In[4]:=
>  FullSimplify[ {0^x,0.0^x}, -Infinity < x < 0 ]
>
> Out[4]=
>  {Infinity, Indeterminate}
Using version 5.1.0.0 for Windows, I get
In[10]:= FullSimplify[{0^x, 0.0^x}, -Infinity < x < 0]
Out[10]= {0^x, Indeterminate}
so I don't know how you got Infinity for 0^x when -Infinity < x < 0.
But in any event, Infinity is incorrect here. As you suggested
earlier, the best result would be ComplexInfinity. Returning 0^x
unchanged, as my version did, while not the best here, is at least
not wrong.
Messier is 0.0^x when -Infinity < x < 0. Indeterminate is the answer
given by both our versions, and I believe it is the correct answer
as well. Given only that az is approximately zero and -Infinity < x < 0,
the expression az^x could potentially be, say, close to 1 (taking |x| to
be very small). Thus, since |az^x| need not be large,
we should not return ComplexInfinity as you had suggested.
But we would have a different situation if the exponent were not
allowed to be close to 0. For example, given -Infinity < x < -1, it
might seem reasonable if 0.0^x simplified to ComplexInfinity,
although that is not what Mathematica does:
In[11]:= FullSimplify[0.0^x, -Infinity < x < -1]
Out[11]= Indeterminate
> -------------------------------
> Sqrt[0.0] and  (0.0^2.3) return the approximate number 0. Shouldn't the
> next line also return approximate zero.
No.  The reason is the same as that above, where I explained why
FullSimplify[0.0^x, -Infinity < x < 0] should not return ComplexInfinity.
But again we would have a different situation if the exponent were
not allowed to be close to 0. For example, given 1 < x < Infinity,
it might seem reasonable if 0.0^x simplified to 0., although that is
not what Mathematica does.
> In[5]:=
>  FullSimplify[ 0.0^x, 0 < x < Infinity]
>
> Out[5]=
>  Indeterminate
Regards,
David Cantrell

