Name

pow function — Computes power

Synopsis

float pow(float x, float y)
float pow(float x, int y)
double pow(double x, double y)
double pow(double x, int y)
long double pow(long double x, long double y)
long double pow(long double x, int y)

The pow function raises x to the y power. If x is negative, and y is not an integral value, a domain error occurs. If x is 0, and y is less than or equal to 0, and the result cannot be represented as a real number, a domain error occurs. A range error can occur if the result is out of range.

See Also

exp function

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.