Question: how to calculate negative value of log?
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π.