Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: gmp_pow - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

gmp_powm" width="11" height="7"/> <gmp_popcount
Last updated: Mon, 05 Feb 2007
view this page in

gmp_pow

(PHP 4 >= 4.0.5, PHP 5)

gmp_pow — べき乗を計算する

説明

resource gmp_pow ( resource base, int exp )

baseexp 乗を 計算します。0^0 の場合は 1 となります。exp を負とすることはできません。

例 750. gmp_pow() の例

<?php
$pow1
= gmp_pow("2", 31);
echo
gmp_strval($pow1) . "\n";
$pow2 = gmp_pow("0", 0);
echo
gmp_strval($pow2) . "\n";
$pow3 = gmp_pow("2", -1); // 負のべき乗を指定したため、警告を発生します
echo gmp_strval($pow3) . "\n";
?>

上のプログラムの出力は以下のようになります。


2147483648
1

     



add a note add a note User Contributed Notes
gmp_pow
There are no user contributed notes for this page.

gmp_powm" width="11" height="7"/> <gmp_popcount
Last updated: Mon, 05 Feb 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites