C examples for complex.h:log10
function template
<complex> <complex.h>
template<class T> complex<T> log10 (const complex<T>& x);
Common logarithm of complex
Returns the common (base-10) logarithm of the complex number x :
log(x)/log(10)
Parameter | Description |
---|---|
x | Complex value. |
Common logarithm of x.
#include <iostream> // std::cout #include <complex> // std::complex, std::imag int main ()//from w w w. j a v a2 s . c o m { std::complex<double> mycomplex (20.0,2.0); std::cout << "Common logarithm: " << std::log10(mycomplex) << '\n'; return 0; }