bcpow
string bcpow(string left_operand, string right_operand, [int scale])
|
left_operand
|
Number to be raised
|
|
right_operand
|
Number to raise by
|
|
scale
|
Number of decimal places to return
|
Calculates the exponent of a number.
Returns:
Value of exponent
Description:
Raises the left operand to the power of the right operand. Either number can be an integer or floating-point value. Returns the result with a specified number of decimal places (optional).
Version:
Existing since version 3.0
Example:
Raise to the power of a large number
$num1 = "9912343.21";
$num2 = "2.35";
echo bcpow($num1,$num2);
Output:
98254543749649
|