Re: Unexpected warning with ArcTan
- To: mathgroup at smc.vnet.net
- Subject: [mg71809] Re: Unexpected warning with ArcTan
- From: "Andrew Moylan" <andrew.j.moylan at gmail.com>
- Date: Thu, 30 Nov 2006 06:04:59 -0500 (EST)
- References: <ekh7ab$sar$1@smc.vnet.net><ekjep8$cb1$1@smc.vnet.net>
Yup, the warning is only issued when the exact expression contains E to a sufficiently high power. It all points to machine precision arithmetic being undertaken somewhere. On Nov 29, 7:01 pm, "dimitris" <dimmec... at yahoo.com> wrote: > ArcTan[Simplify[1/(1/2 + (1/2)*(-1 + 1/E^63))]] > ArcTan[2*E^10] > > Strangely, > > In[42]:= > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^10))] > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^20))] > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^30))] > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^40))] > > Out[42]= > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^10))] > > Out[43]= > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^20))] > > Out[44]= > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^30))] > > Out[45]= > Power::"infy" : "Infinite expression \!\(1\/0.`\) encountered." > ArcTan[1/(1/2 + 1/2*(-1 + 1/E^40))] > > Regards > Dimitris > > Ï/Ç Andrew Moylan Ýãñáøå: > > > Hi all. > > > 1/(1/2 + (1/2)*(-1 + 1/E^63)) is an exact expression that's equal to > > 2*E^63: > > > 1/(1/2 + (1/2)*(-1 + 1/E^63)) // Simplify > > gives > > 2*E^63 > > > Now, evaluating > > ArcTan[2*E^63] > > gives > > ArcTan[2*E^63] > > > Evaluating > > ArcTan[1/(1/2 + (1/2)*(-1 + 1/E^63))] > > similarly gives > > ArcTan[1/(1/2 + (1/2)*(-1 + 1/E^63))] > > but first it issues the following warnings: > > > Power::"infy" : "Infinite expression \!\(1\/0.`\) encountered." > > Power::"infy" : "Infinite expression \!\(1\/0.`\^1.`\) encountered." > > > The warnings suggest finite- or machine-precision arithmetic is being > > used somewhere (1/0.); but this is an exact expression. > > > If ArcTan is replaced by e.g. ArcSin the same warnings are generated. > > If it is replaced by e.g. Sin, no warnings are generated. Either way, > > Mathematica returns the exact expression unchanged. > > > Can anyone explain the origin of these warnings? > > > Cheers, > > Andrew