doublepow(doublebase,doubleexp); longdoublepow(longdoublebase,longdoubleexp); (until C++23) /* floating-point-type */ pow(/* floating-point-type */base, /* floating-point-type */exp) (since C++23) (constexpr since C++26) floatpow(floatbase,intexp); ...
/* common-floating-point-type */ pow ( Arithmetic1 base, Arithmetic2 exp ); (A) (C++26 起为 constexpr) 1-4) 计算base 的exp 次幂。标准库提供所有以无 cv 限定的浮点数类型作为参数 base 和exp 的类型的 std::pow 重载。(C++23 起)A...
results[n]; } return os << '\n'; } public: std::valarray<int> bases{}, exponents{}, results{}; }; int main() { constexpr int base{2}; constexpr int exponent{5}; const std::valarray<int> bases{1, 2, 3, 4, 5, 6, 7}; const std::valarray<int> exponents{0, 1, 2, ...
并且内置函数似乎在gcc/builtins.c#L2100中处理,但最后pow由C标准库处理,当fold-const-call.c#L1393...
c#L2100中处理,但最后pow由C标准库处理,当fold-const-call.c#L1393中的fold_const_call_sss()返回...