gmp_legendre

(PHP 4 >= 4.0.4, PHP 5, PHP 7)

gmp_legendreLegendre symbol

说锟斤拷

gmp_legendre ( GMP $a , GMP $p ) : int

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

锟斤拷锟斤拷

a

锟斤拷锟斤拷锟斤拷一锟斤拷 GMP 锟斤拷锟斤拷 resouce锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷转锟斤拷为锟斤拷值锟斤拷锟街凤拷锟斤拷锟斤拷

p

锟斤拷锟斤拷锟斤拷一锟斤拷 GMP 锟斤拷锟斤拷 resouce锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷转锟斤拷为锟斤拷值锟斤拷锟街凤拷锟斤拷锟斤拷

Should be odd and must be positive.

锟斤拷锟斤拷值

GMP 锟斤拷值锟斤拷源.

锟斤拷锟斤拷

Example #1 gmp_legendre() example

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

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

1
0

锟轿硷拷