ฟังก์ชัน gmp_jacobi() คำนวณ Jacobi Symbol ของจำนวน GMP 2 ตัว
ไวยากรณ์
gmp_jacobi($n1, $n2)
พารามิเตอร์
- n1: จำนวน GMP ตัวแรก
- n2: จำนวน GMP ตัวที่สอง
คืนค่า
GMP number/object คือ Jacobi symbol
ตัวอย่าง
<?php $n1 = gmp_init(2); $n2 = gmp_init(3); $a = gmp_jacobi($n1, $n2); echo $a; ?>
ผลลัพธ์
-1