C++ Complex Library - Log



Description

It is a natural logarithm of complex and returns the natural (base-e) logarithm of the complex number x, using the principal branch, whose cuts are along the negative real axis. .

he value computed is bounded along the imaginary axis between [-i*PI,i*PI].When x is a negative real number, log(x).imag() is PI.

Declaration

Following is the declaration for std::log.

template<class T> complex<T> log (const complex<T>& x);

C++11

	
template<class T> complex<T> log (const complex<T>& x);

Parameters

x − It is a complex value.

Return Value

It returns the natural (base-e) logarithm of the complex number x, using the principal branch, whose cuts are along the negative real axis.

Exceptions

none

complex.htm
Advertisements