September 2001
Intermediate to advanced
768 pages
32h 45m
English
float pow(float number, float power)
Raises the first argument to the power of the second argument.
Returns:
Result of raising one number to the power of another
Description:
This function raises number to the power of power . For example, to raise 3 to the power of 2, the notation is pow(3, 2). See the example for pi() to see how this function applies when calculating the area of a circle.
Version:
PHP 3, PHP 4
See also:
sqrt()
Example:
$hyp = 5; $adj = 4; $opp = 3; $hyp_calc = pow($opp, 2) + pow($adj, 2); $hyp_true = pow($hyp, 2); echo "a squared + b squared = $hyp_calc<BR />\n"; echo "c squared = $hyp_true\n"; |
Read now
Unlock full access