MathGroup Archive 2009

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

Search the Archive

Re: Very strange behaviour of ArcTan[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102674] Re: Very strange behaviour of ArcTan[]
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Tue, 18 Aug 2009 06:09:10 -0400 (EDT)

On 8/17/09 at 8:06 AM, lehin.p at gmail.com (Alexey) wrote:

>Hello, I just have discovered some strange (buggy?) feature of
>ArcTan[] function in Mathematica 5.2. Try the following;

>In[72]:= ArcTan[.5,$MachinePrecision] ArcTan[.5]

>Out[72]= 1.53947

>Out[73]= 0.463648

>The expression ArcTan[.5,$MachinePrecision] must (?) give an error
>but in really gives some strange output without any error
>messages... What do you think about this?

It appears the result you are getting is entirely consistent
with the documented behavior of ArcTan which I am guessing you
have not looked at. Specifically, the documentation states
ArcTan[x,y] computes ArcTan[y/x] paying attention to the
quadrant (x,y) is in. Since $MachinePrecision returns a numeric
value there is no error generated when evaluating ArcTan[.5,
$MachinePrecision]. And since $MachinePrecision is a positive value

In[6]:= ArcTan[.5, $MachinePrecision] == ArcTan[$MachinePrecision/.5]

Out[6]= True




  • Prev by Date: Re: histograms, logarithmic
  • Next by Date: Re: Very strange behaviour of ArcTan[]
  • Previous by thread: Re: Very strange behaviour of ArcTan[]
  • Next by thread: Re: Very strange behaviour of ArcTan[]