std::pow(std::complex) (3) - Linux Manuals
std::pow(std::complex): std::pow(std::complex)
NAME
std::pow(std::complex) - std::pow(std::complex)
Synopsis
Defined in header <complex>
template< class T > (1)
complex<T> pow( const complex<T>& x, const complex<T>& y);
template< class T > (2)
complex<T> pow( const complex<T>& x, const T& y);
template< class T > (3)
complex<T> pow( const T& x, const complex<T>& y);
template< class T, class U > (4) (since C++11)
complex</*Promoted*/> pow( const complex<T>& x, const complex<U>& y);
template< class T, class U > (5) (since C++11)
complex</*Promoted*/> pow( const complex<T>& x, const U& y);
template< class T, class U > (6) (since C++11)
complex</*Promoted*/> pow( const T& x, const complex<U>& y);
1-3) Computes complex x raised to a complex power y with a branch cut along the negative real axis for the first argument.
4-6) Additional overloads are provided for all arithmetic types, such that
Parameters
x - base as a complex value
y - exponent as a complex value
Return value
If no errors occur, the complex power xy
, is returned.
Errors and special cases are handled as if the operation is implemented by std::exp(y*std::log(x))
The result of std::pow(0, 0) is implementation-defined.
Example
// Run this code
Output:
See also
sqrt(std::complex) (function template)
pow
powf
powl raises a number to the given power (xy)
(C++11)
(C++11)
pow(std::valarray) (function template)