Complex logarithm
Calculating the principal value

The polar form of a nonzero complex number z = x + y i {\displaystyle z=x+yi} is z = r e i θ {\displaystyle z=re^{i\theta }}, where r = | z | = x 2 + y 2 {\textstyle r=|z|={\sqrt {x^{2}+y^{2}}}} is the absolute value of z {\displaystyle z}, and θ {\displaystyle \theta } is its argument. The absolute value is real and positive. The argument is defined up to addition of an integer multiple of 2 π. Its principal value is the value that belongs to the interval (− π, π ] {\displaystyle (-\pi,\pi ]}, which is expressed as atan2 (y, x) {\displaystyle \operatorname {atan2} (y,x)}.

This leads to the following formula for the principal value of the complex logarithm:

For example, Log (− 3 i) = ln 3 − π i / 2 {\displaystyle \operatorname {Log} (-3i)=\ln 3-\pi i/2}, and Log (− 3) = ln 3 + π i {\displaystyle \operatorname {Log} (-3)=\ln 3+\pi i}.
keywords:forbidden_words