< C++ Programming < Code < Standard C Library < Functions

pow

Syntax
#include <cmath>
double pow( double base, double exp );

The pow() function returns base raised to the expth power. There's a domain error if base is zero and exp is less than or equal to zero. There's also a domain error if base is negative and exp is not an integer. There's a range error if an overflow occurs.

Related topics
exp - log - sqrt
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.