gmp_powm
(PHP 4 >= 4.0.4, PHP 5)
gmp_powm — Raise number into power with modulo
설명
resource gmp_powm
( resource $base
, resource $exp
, resource $mod
)
Calculate (base raised into power exp ) modulo mod . If exp is negative, result is undefined.
인수
- base
-
The base number.
GMP 수 resource나 수로 변환할 수 있는 문자열일 수 있습니다.
- exp
-
The positive power to raise the base .
GMP 수 resource나 수로 변환할 수 있는 문자열일 수 있습니다.
- mod
-
The modulo.
GMP 수 resource나 수로 변환할 수 있는 문자열일 수 있습니다.
반환값
The new (raised) number, as a GMP number.
예제
Example #1 gmp_powm() example
<?php
$pow1 = gmp_powm("2", "31", "2147483649");
echo gmp_strval($pow1) . "\n";
?>
위 예제의 출력:
2147483648
gmp_powm
There are no user contributed notes for this page.
