PHP BCMath Arbitrary Precision Mathematics Functions
EditRocket provides the following information on BCMath Arbitrary Precision Mathematics functions in the PHP source code builder.
string bcadd ( string $left_operand , string $right_operand [, int $scale ] ) - Sums left_operand and right_operand.
int bccomp ( string $left_operand , string $right_operand [, int $scale ] ) - Compares the left_operand to the right_operand and returns the result as an integer.
string bcdiv ( string $left_operand , string $right_operand [, int $scale ] ) - Divides the left_operand by the right_operand.
string bcmod ( string $left_operand , string $modulus ) - Get the modulus of the left_operand using modulus.
string bcmul ( string $left_operand , string $right_operand [, int $scale ] ) - Multiply the left_operand by the right_operand.
string bcpow ( string $left_operand , string $right_operand [, int $scale ] ) - Raise left_operand to the power right_operand.
string bcpowmod ( string $left_operand , string $right_operand , string $modulus [, int $scale ] ) - Use the fast-exponentiation method to raise left_operand to the power right_operand with respect to the modulus modulus.
bool bcscale ( int $scale ) - Sets the default scale parameter for all subsequent bc math functions that do not explicitly specify a scale parameter.
string bcsqrt ( string $operand [, int $scale ] ) - Return the square root of the operand.
string bcsub ( string $left_operand , string $right_operand [, int $scale ] ) - Subtracts the right_operand from the left_operand.