pow

 
 
 

Returns a base number raised to an exponent.

float pow(float base, float exponent )

base is the base number you want to raise to the exponent. A negative base number with a decimal component causes an error message.

exponent is the exponent.

Examples

pow(2,3)

Returns 8.

pow(-2,3)

Returns -8.

pow(2,-3)

Returns 0.125.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License