function template
<complex>

std::pow

template<class T> complex<T> pow (const complex<T>& x, int y);
template<class T> complex<T> pow (const complex<T>& x, const complex<T>& y);
template<class T> complex<T> pow (const complex<T>& x, const T& y);
template<class T> complex<T> pow (const T& x, const complex<T>& y);
template<class T> complex<T> pow (const complex<T>& x, const complex<T>& y);
template<class T> complex<T> pow (const complex<T>& x, const T& y);
template<class T> complex<T> pow (const T& x, const complex<T>& y);
Power of complex
Returns the complex power of base x raised to the y-th power using the principal branch, whose cuts are along the negative real axis, as if computed by:

 
exp(y*log(x))


This is the complex version of the pow function (defined in <cmath>).

Parameters

x
Base value.
y
Exponent value.
T is the type of the components of the complex type (i.e., its value type).

Return value

The result of raising x to the y-th power.
The value returned for pow(0,0) is implementation-defined.

See also