# Real and imaginary parts of log

Write $z \in \mathbb{C}$ using polar coordinates: $z=x+iy=re^{i\theta}$. The following formula holds for $-\pi < \mathrm{arg}(z) \leq \pi$: $$\log(z)=\log(r)+i\theta,$$ where $\mathrm{arg}$ denotes the argument and $\log$ denotes the logarithm.