Table of Contents
where is the principal value of the arctangent, ie. the one in the interval .
The partial derivatives, just like the function itself, are defined everywhere except at the origin. Furthermore, unlike the function, they're not discontinuous along (except at the origin).
Interesingly, the function has the same partial derivatives.
Systems of equations involving the cosine and the sine of an unknown
Let . Consider the following system of equations:
If , this system has a unique (up to a multiple of ) solution:
for any . For simplicity k is often set to zero.
Because (up to a multiple of ), atan2 can be thought of as the “inverse” of the cosine and sine of the same argument.
The definition at the beginning of this article is suitable for mathematical analysis. However, a more intricate definition is needed for floating-point computation, one that takes signed zeros and infinites into account. The following appears in the C standard:
In this definition is not undefined.