I've noticed a strange behavior of Mathematica's ArcTan function with two arguments. If both arguments are 0 or 0., Mathematica evaluates the ArcTan to Indeterminate.
ArcTan[0, 0]
During evaluation of In[1]:= ArcTan::indet: Indeterminate expression ArcTan[0,0] encountered. >> Indeterminate
ArcTan[0., 0.]
During evaluation of In[2]:= ArcTan::indet: Indeterminate expression ArcTan[0.,0.] encountered. >> Indeterminate
However, I get different results if only one argument is using machine precision:
ArcTan[0., 0]
0
ArcTan[0, 0.]
π/2
No warning is displayed. This inconsistent behavior is causing problems in my code. Is it a bug or is it intentional? Why does this happen?