std::log10(std::complex) (3) - Linux Manuals
std::log10(std::complex): std::log10(std::complex)
Command to display std::log10(std::complex)
manual in Linux: $ man 3 std::log10(std::complex)
NAME
std::log10(std::complex) - std::log10(std::complex)
Synopsis
Defined in header <complex>
template< class T >
complex<T> log10( const complex<T>& z );
Computes complex common (base 10) logarithm of a complex value z with a branch cut along the negative real axis.
The behavior of this function is equivalent to std::log(z)/std::log(T(10)).
Parameters
z - complex value
Return value
Complex common logarithm of z
Example
// Run this code
#include <iostream>
#include <cmath>
#include <complex>
int main()
{
std::complex<double> z(0, 1); // // r = 0, θ = pi/2
std::cout << "2*log10" << z << " = " << 2.*std::log10(z) << '\n';
std::complex<double> z2(sqrt(2)/2, sqrt(2)/2); // r = 1, θ = pi/4
std::cout << "4*log10" << z2 << " = " << 4.*std::log10(z2) << '\n';
std::complex<double> z3(-100, 0); // r = 100, θ = pi
std::cout << "log10" << z3 << " = " << std::log10(z3) << '\n';
std::complex<double> z4(-100, -0.0); // the other side of the cut
std::cout << "log10" << z4 << " (the other side of the cut) = "
<< std::log10(z4) << '\n'
<< "(note: pi/log(10) = " << acos(-1)/log(10) << ")\n";
}
Output:
2*log10(0,1) = (0,1.36438)
4*log10(0.707107,0.707107) = (0,1.36438)
log10(-100,0) = (2,1.36438)
log10(-100,-0) (the other side of the cut) = (2,-1.36438)
(note: pi/log(10) = 1.36438)
See also
complex natural logarithm with the branch cuts along the negative real axis
log(std::complex) (function template)
log10
log10f
log10l computes common (base 10) logarithm (log10(x))
(function)
(C++11)
(C++11)
applies the function std::log10 to each element of valarray
log10(std::valarray) (function template)
Pages related to std::log10(std::complex)
- std::log10(std::valarray) (3) - std::log10(std::valarray)
- std::log10,std::log10f,std::log10l (3) - std::log10,std::log10f,std::log10l
- std::log1p,std::log1pf,std::log1pl (3) - std::log1p,std::log1pf,std::log1pl
- std::log(std::complex) (3) - std::log(std::complex)
- std::log(std::valarray) (3) - std::log(std::valarray)
- std::log,std::logf,std::logl (3) - std::log,std::logf,std::logl
- std::log2,std::log2f,std::log2l (3) - std::log2,std::log2f,std::log2l
- std::log2p1 (3) - std::log2p1
- std::logb,std::logbf,std::logbl (3) - std::logb,std::logbf,std::logbl
- std::logic_error (3) - std::logic_error
- std::logical_and (3) - std::logical_and
- std::logical_and<void> (3) - std::logical_and<void>