Solution (source code)

= Solution

In <polar coordinates>, $x=r\cos\theta$, $y=r\sin\theta$, with $r=\sqrt{x^2+y^2}$. Thus the <polar form of a complex number> is
$$
\boxed{z=r(\cos\theta+i\sin\theta)=re^{i\theta}.}
$$
Here $r=|z|\geq0$ is its <complex modulus>; for $z\ne0$, the <complex argument> $\theta$ is determined modulo $2\pi$. At $z=0$ the angle is undefined, although every value of $\theta$ gives the same point when $r=0$.