Here is my answer to a similar question posed a few days ago:
One of the most important functions in analysis is the function
$$\arg:\quad \dot{\mathbb R}^2\to{\mathbb R}/(2\pi),\quad{\rm resp.},\quad \dot{\mathbb C}\to{\mathbb R}/(2\pi),$$
written as $$\arg(x,y), \quad \arg(x+iy),\quad{\rm or}\quad \arg(z),$$
depending on context. It gives the angle you are talking about "up to multiples of $2\pi$". If you remove the negative $x$-axis (resp., negative real axis) from $\dot{\mathbb R}^2$ (resp., from $\dot{\mathbb C}$) you can single out the principal value of the argument, denoted by ${\rm Arg}(x,y)$, which is then a well defined continuous real-valued function on this restricted domain, taking values in $\ ]-\pi,\pi[\ $. One has
$${\rm Arg}(x,y)=\arctan{y\over x}\qquad(x>0)$$
and similar formulas in other half planes.
Even though the values of $\arg$ are not "ordinary real numbers" the gradient of $\arg$ is a well defined vector field in $\dot{\mathbb R}^2$, and is given by
$$\nabla\arg(x,y)=\left({-y\over x^2+y^2},\>{x\over x^2+y^2}\right)\qquad\bigl((x,y)\ne(0,0)\bigr)\ .$$