Forum und email

bcpow

(PHP 4, PHP 5)

bcpow — 任意精度数値をべき乗する

説明

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

left_operandright_operand 乗を求めます。

パラメータ

left_operand

左オペランドを表す文字列。

right_operand

右オペランドを表す文字列。

scale

このオプションパラメータを使用して、 結果の小数点以下の桁数を指定します。すべての関数で使用するデフォルトのスケールを定義するには bcscale() を使用します。

返り値

結果を文字列で返します。

Example#1 bcpow() の例

<?php

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

?>