PHP 8.3.4 Released!

gmp_legendre

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

gmp_legendreルジェンドル記号

説明

gmp_legendre(GMP|int|string $num1, GMP|int|string $num2): int

num1num2» ルジェンドル記号 を計算します。num2 は、正の奇数である必要があります。

パラメータ

num1

GMP オブジェクト、整数、あるいは数値に変換可能な数値形式の文字列。

num2

GMP オブジェクト、整数、あるいは数値に変換可能な数値形式の文字列。

正の奇数でなければなりません。

戻り値

GMP オブジェクトを返します。

例1 gmp_legendre() の例

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

上の例の出力は以下となります。

1
0

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top