You're not reading the latest revision of this page, which is here.

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.
https://miau.mumie.net/web-miau/editor/content%2Fexamples%2FinputFunction%2Fprb_input_function_polar-representation_complex-number.src.tex

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.