function template
<complex>

std::log

template<class T> complex<T> log (const complex<T>& x);
複數的自然對數
返回複數 x 的自然(以 e 為底)對數,使用主分支,其割線沿著負實軸。

計算的值在虛軸上的範圍是 [-i*PI,i*PI]
x 是負實數時,log(x).imag()PI

這是 <cmath> 中定義的 log 函式的 complex 版本。

引數

x
複數值。

返回值

x 的自然對數。

另見