After ?invtrig:

For real arguments x, y, the two-argument function arctan(y, x), computes the principal value of the argument of the complex number x+I*y, so -Pi < arctan(y, x) <= Pi.

For any point in C or R^2 (x,y)<>(0,0) the geometrical meaning of this result is clear: the angle that the segment/vector from (0,0) to (x,y) forms with the x-axis. But this angle is undefined if this point is the origin.

So, what is arctan(0,0)?, and what it should be?

The output of Maple is 0. This value is not documented in ?invtrig, or elsewhere, apparently. So, is this an intended, undocumented value? Is this value a bug?

I read in this Wikipedia article

As defined above, and traditionally, atan2(0,0) is undefined. Some current implementations define it as 0.

Reasons why I consider that the current output is wrong and should be "undefined" (or an error):

1. The geometrical interpretation stated above, for x,y real.

2. The extension for complex arguments stated in ?invtrig:

This function is extended to complex arguments by the formula

Here I write it as this function (note the order of the arguments):


Presumably this statment means that arctan(y,x)-at(x,y) is identically 0 on C^2, including the origin. This fact is not plain clear as:


                                      x + y I
                  arctan(y, x) + ln(------------) I
                                      2    2 1/2
                                    (x  + y )

But some hint that it is true is given by:


Now, Maple produces an error for this "extended" function:


Error, (in at) numeric exception: division by zero

3. What other CAS with equivalent commands produce as output:

Maxima 5.14:


atan2(0,0) has been generated.

-- an error.  To debug this try debugmode(true);

Mathematica 5:

ArcTan[0, 0]

ArcTan::indet: Indeterminate expression tan^(-1)(0, 0) encountered.

Interval[{-\[Pi], \[Pi]}]

Please Wait...