Forum und email

gmp_legendre

(PHP 4 >= 4.0.4, PHP 5)

gmp_legendre — Legendre symbol

설명

int gmp_legendre ( resource $a , resource $p )

Compute the » Legendre symbol of a and p . p should be odd and must be positive.

매개변수

a

GMP 수 resource나 수로 변환할 수 있는 문자열일 수 있습니다.

p

GMP 수 resource나 수로 변환할 수 있는 문자열일 수 있습니다.

Should be odd and must be positive.

반환값

GMP 수 resource.

예제

Example#1 gmp_legendre() example

<?php
echo gmp_legendre("1""3") . "\n";
echo 
gmp_legendre("2""3") . "\n";
?>

위 예제의 출력:

1
0