MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Unexpected warning with ArcTan


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


  • Prev by Date: NetLink with float* as argument
  • Next by Date: Re: Real numerical computations
  • Previous by thread: Unexpected warning with ArcTan
  • Next by thread: Re: Unexpected warning with ArcTan