xref: /PHP-8.0/ext/gmp/tests/gmp_kronecker.phpt (revision c6c9e71a)
1--TEST--
2gmp_kronecker(): Kronecker symbol
3--SKIPIF--
4<?php if (!extension_loaded('gmp')) die('skip gmp extension not loaded'); ?>
5--FILE--
6<?php
7
8var_dump(gmp_kronecker(23, 12));
9var_dump(gmp_kronecker(gmp_init(23), 12));
10var_dump(gmp_kronecker(23, gmp_init(12)));
11var_dump(gmp_kronecker(gmp_init(23), gmp_init(12)));
12var_dump(gmp_kronecker("23", 12));
13var_dump(gmp_kronecker(23, "12"));
14var_dump(gmp_kronecker("23", "12"));
15echo "\n";
16
17var_dump(gmp_kronecker(23, -12));
18var_dump(gmp_kronecker(-23, 12));
19var_dump(gmp_kronecker(-23, -12));
20
21?>
22--EXPECT--
23int(-1)
24int(-1)
25int(-1)
26int(-1)
27int(-1)
28int(-1)
29int(-1)
30
31int(-1)
32int(1)
33int(-1)
34