C++ 複雜庫 - Pow



描述

它是複數的冪運算,並返回底數 x 提升到 y 次冪的複數冪,使用主分支。

宣告

以下是 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);

C++11

	
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);

引數

  • x − 它是一個複數值。

  • y − 它是一個指數值。

返回值

它返回底數 x 提升到 y 次冪的複數冪,使用主分支。

異常

complex.htm
廣告