GMP gmp_powm
(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
gmp_powm — 모듈로 숫자를 거듭제곱
설명
gmp_powm(GMP|int|string $num
, GMP|int|string $exponent
, GMP|int|string $modulus
): GMP
Calculate (num
raised into power exponent
) modulo modulus
. If exponent
is negative, result is undefined.
매개변수
num
- 기본 숫자입니다.
GMP 개체, int 또는 숫자 문자열입니다.
exponent
- The positive power to raise the
num
.GMP 개체, int 또는 숫자 문자열입니다.
modulus
- The modulo.
GMP 개체, int 또는 숫자 문자열입니다.
반환 값
GMP 번호로서의 새로운(상승된) 번호.
Examples
예제 #1 gmp_powm() 예제
<?php
$pow1 = gmp_powm("2", "31", "2147483649");
echo gmp_strval($pow1) . "\n";
?>
위의 예는 다음을 출력합니다.
2147483648