|
|
#include <cmath>float pow(float base, float exp);float pow(float base, int exp); double pow(double base, double exp); double pow(double base, int exp); long double pow(long double base, long double exp); long double pow(long double base, int exp);
The pow( ) function returns base raised to the exp power (baseexp). A domain error may occur if base is zero and exp is less than or equal to zero. It will also happen if base is negative and exp is not an integer. An overflow produces a range error.
Related functions are exp( ), log( ), and sqrt( ).
|
|