PHP/Math/pow
number pow ( number base, number exponent), a base and a power to raise it by
<source lang="html4strict">
<?
print pow(10,2); // 100 print pow(10,3); // 1000 print pow(10,4); // 10000 print pow(-10, 4); // 10000
?>
</source>
Using the pow() function with integers, floats, and both negative and positive numbers.
<source lang="html4strict">
<?php echo pow(2, 8) . "\n"; echo pow(-2, 5) . "\n"; echo pow(0, 0) . "\n"; echo pow(M_E, 1) . "\n"; echo pow(3.2, 4.5) . "\n"; echo pow(2, -2) . "\n"; echo pow(-2, -3) . "\n"; echo pow(9, 0.5) . "\n"; ?>
</source>