std::atan(std::complex) (3) - Linux Manuals
std::atan(std::complex): std::atan(std::complex)
NAME
std::atan(std::complex) - std::atan(std::complex)
Synopsis
Defined in header <complex>
template< class T > (since C++11)
complex<T> atan( const complex<T>& z );
Computes complex arc tangent of a complex value z. Branch cut exists outside the interval [−i ; +i] along the imaginary axis.
Parameters
z - complex value
Return value
If no errors occur, complex arc tangent of z is returned, in the range of a strip unbounded along the imaginary axis and in the interval [−π/2; +π/2] along the real axis.
Errors and special cases are handled as if the operation is implemented by -i * std::atanh(i*z), where i is the imaginary unit.
Notes
Inverse tangent (or arc tangent) is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally placed at the line segments (-∞i,-i) and (+i,+∞i) of the imaginary axis.
The mathematical definition of the principal value of inverse tangent is atan z = -
1
2
i [ln(1 - iz) - ln (1 + iz)]
Example
// Run this code
Output:
See also
asin(std::complex) computes arc sine of a complex number (arcsin(z))
(C++11)
acos(std::complex) computes arc cosine of a complex number (arccos(z))
(C++11)
tan(std::complex) (function template)
atan
atanf
atanl computes arc tangent (arctan(x))
(C++11)
(C++11)
atan(std::valarray) (function template)