Complex Numbers

A complex number can be represented as a pair of real numbers (cartesian coordinates)
$$z = x + iy$$ or in polar coordinates $$ z = r\,e^{i\, \phi}$$. The phase $$\phi$$ is defined up to a multiple of $$2\,\pi$$

The computation of the polar coordinates is set as a problem in the list of examples.

The computation of the phase $$\phi$$ requires some care:
$$ \phi = \arctan(y/x), \mod 2\pi, \text{for}\, x > 0 $$
$$ \phi = \arctan(y/x) + \pi, \mod 2\pi, \text{for}\, x < 0 $$

The case $$x=0$$ does not occure in the problem.