So I was checking a math problem recently: ln((2-√4+4)/2), and to my surprise, the answer came out to be -0.881373587 + 3.141592654i. How did pi work its way in there? Of course it turned out that
ln((x-√(x^2 +4))/2) alway produced a πi in the answer. Now I'm a newbie at this stuff so there might be an easy explanation for this but I can't seem to find one. Does someone know why this happens?