Question: how to calculate the log of a negative number?
Answer: In particular, the logarithm of a negative real number x can then be calculated as log(x)=log(|x|eiπ)=log(|x|)+log(eiπ)=log(|x|)+iπ.