BC Math Функции
PHP Manual

bcpow

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

Параметри

left_operand

The left operand, as a string.

right_operand

The right operand, as a string.

scale

Този незадължителен параметър се използва за да се установи броя на цифрите след десетичната точка в резултата. Също така може да установите глобалния scale по подразбиране за всички функции, като използвате bcscale().

Връщани стойности

Returns the result as a string.

Примери

Example #1 bcpow() example

<?php

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

?>

Вж. също


BC Math Функции
PHP Manual