|
powfunction
double pow ( double base, double exponent ); long double pow ( long double base, long double exponent ); float pow ( float base, float exponent ); double pow ( double base, int exponent ); long double pow ( long double base, int exponent ); Raise to power Returns base raised to the power exponent:baseexponent In C++, this function is overloaded in <complex> and <valarray> (see complex pow and valarray pow). Parameters
Return ValueThe result of raising base to the power exponent.If the magnitude of the result is so large that it cannot be represented in an object of the return type, a range error occurs, returning HUGE_VAL with the appropiate sign and setting the value of the global variable errno to the ERANGE value. If base is negative and exponent is not an integral value, or if base is zero and exponent is negative, a domain error occurs, setting the global variable errno to the value EDOM. PortabilityIn C, only the version taking two double parameters exists with this name. The other overloads are only available in C++.Example
Output:
See also
|