php man page for bcpow

Query: bcpow

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

BCPOW(3)								 1								  BCPOW(3)

bcpow - Raise an arbitrary precision number to another

SYNOPSIS
string bcpow (string $left_operand, string $right_operand, [int $scale])
DESCRIPTION
Raise $left_operand to the power $right_operand.
PARAMETERS
o $left_operand - The left operand, as a string. o $right_operand - The right operand, as a string. o $ scale -This optional parameter is used to set the number of digits after the decimal place in the result. You can also set the global default scale for all functions by using bcscale(3).
RETURN VALUES
Returns the result as a string.
EXAMPLES
Example #1 bcpow(3) example <?php echo bcpow('4.2', '3', 2); // 74.08 ?>
NOTES
Note bcpow(3) may return a result with fewer digits after the decimal point than the $scale parameter would indicate. This only occurs when the result doesn't require all of the precision allowed by the $scale. For example: Example #2 bcpow(3) scale example <?php echo bcpow('5', '2', 2); // prints "25", not "25.00" ?>
SEE ALSO
bcpowmod(3), bcsqrt(3). PHP Documentation Group BCPOW(3)
Related Man Pages
plan9-dc(1) - debian
dc(1) - plan9
pmunitsstr(3) - centos
ctype_digit(3) - php
db2_field_scale(3) - php
Similar Topics in the Unix Linux Community
bc calculate problem
Rounding problem
incremental by 1
converting string to number in shell script
Program Hangs