# std::pow(std::complex)

< cpp‎ | numeric‎ | complex

C++
 Language Standard library headers Concepts Utilities library Strings library Containers library Algorithms library Iterators library Numerics library Input/output library Localizations library Regular expressions library (C++11) Atomic operations library (C++11) Thread support library (C++11) Filesystem library (C++17) Technical Specifications

Numerics library
 Common mathematical functions Special mathematical functions Floating-point environment (C++11) Complex numbers Numeric arrays Pseudo-random number generation Compile-time rational arithmetic (C++11) Generic numeric operations iota(C++11) accumulate inner_product adjacent_difference partial_sum

std::complex
Member functions
Non-member functions
 real imag abs arg norm conj proj(C++11) polar operator""ioperator""ifoperator""il(C++14)(C++14)(C++14)
Exponential functions
Power functions
pow
Trigonometric functions
 asin(C++11) acos(C++11) atan(C++11)
Hyperbolic functions
 asinh(C++11) acosh(C++11) atanh(C++11)

 Defined in header `` template< class T > complex pow( const complex& x, const complex& y); template< class T > complex pow( const complex& x, const T& y); template< class T > complex pow( const T& x, const complex& y); template< class T, class U > complex pow( const complex& x, const complex& y); (since C++11) template< class T, class U > complex pow( const complex& x, const U& y); (since C++11) template< class T, class U > complex pow( const T& x, const complex& y); (since C++11)

Computes complex `x` raised to a complex power `y`. The operation is defined as exp(y · log(x) ). A branch cut exists along the negative real axis.

The result of pow(0, 0) is implementation-defined.

(since C++11)Additional overloads are provided for all arithmetic types, such that

1. If either argument is long double or std::complex<long double>, then both arguments are cast to std::complex<long double>
2. Otherwise, if either argument is double, std::complex<double> or integer type, then both arguments are cast to std::complex<double>
3. Otherwise, if either argument is float or std::complex<float>, then both arguments are cast to std::complex<float>

### Parameters

 x - base as a complex value y - exponent as a complex value

### Return value

`x` raised to a power `y`.

### See also

 exp(std::complex) complex base e exponential (function template)  sqrt(std::complex) complex square root in the range of the right half-plane (function template)