log function template — Computes natural logarithm
template<typename T> complex<T> log(const complex<T>& z)
The log
function returns
the complex natural (base e
)
logarithm of z
. The branch cuts
are along the negative real axis, which means the imaginary part of
the result is in the range [-πi
, πi
].