IMPRESS dotted_line CONTACT dotted_line search dotted_line Kontakt dotted_line sitemap dotted_line print
178 PHP-Resource users online

Switch to another languags Deutsch aktuelle Sprache Englisch

PHP Manual


(PHP 4, PHP 5)

bcpowRaise an arbitrary precision number to another


string bcpow ( string $left_operand , string $right_operand [, int $scale ] )

Raise left_operand to the power right_operand.



The left operand, as a string.


The right operand, as a string.


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().

Return Values

Returns the result as a string.


Example #1 bcpow() example


echo bcpow('4.2''3'2); // 74.08




bcpow() 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() scale example

echo bcpow('5''2'2);     // prints "25", not "25.00"

See Also

  • bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus
  • bcsqrt() - Get the square root of an arbitrary precision number

Comments to the PHP manual
Write new comment


New Tutorial entries

Migration einer PHP 5 App auf PHP 7

Dieses PHP 7 Tutorial zeigt dir, wie du dein PHP5 Script auf PHP7 umstellst.

Berni | Category: PHP
PHP 7 Virtual Machine

Dieser Artikel zielt darauf ab, einen Überblick über die Zend Virtual Machine, wie es in PHP 7 gefunden wird.

Berni | Category: PHP
plotting masters - a professional guide - Teil II

Grafische Interpolation und Bestapproximation von numerischen Wertepaaren: Wir wollen Punkte auf einer Zeichenebene über verschiedene Verfahren miteinander verbinden.

EVAMasters | Category: PHP