xref: /PHP-8.0/ext/gmp/gmp.stub.php (revision 25198277)
1<?php
2
3/** @generate-function-entries */
4
5class GMP
6{
7}
8
9function gmp_init(int|string $num, int $base = 0): GMP {}
10
11function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP {}
12
13function gmp_export(GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string {}
14
15function gmp_intval(GMP|int|string $num): int {}
16
17function gmp_strval(GMP|int|string $num, int $base = 10): string {}
18
19function gmp_add(GMP|int|string $num1, GMP|int|string $num2): GMP {}
20
21function gmp_sub(GMP|int|string $num1, GMP|int|string $num2): GMP {}
22
23function gmp_mul(GMP|int|string $num1, GMP|int|string $num2): GMP {}
24
25function gmp_div_qr(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): array {}
26
27function gmp_div_q(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}
28
29function gmp_div_r(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}
30
31/** @alias gmp_div_q */
32function gmp_div(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}
33
34function gmp_mod(GMP|int|string $num1, GMP|int|string $num2): GMP {}
35
36function gmp_divexact(GMP|int|string $num1, GMP|int|string $num2): GMP {}
37
38function gmp_neg(GMP|int|string $num): GMP {}
39
40function gmp_abs(GMP|int|string $num): GMP {}
41
42function gmp_fact(GMP|int|string $num): GMP {}
43
44function gmp_sqrt(GMP|int|string $num): GMP {}
45
46function gmp_sqrtrem(GMP|int|string $num): array {}
47
48function gmp_root(GMP|int|string $num, int $nth): GMP {}
49
50function gmp_rootrem(GMP|int|string $num, int $nth): array {}
51
52function gmp_pow(GMP|int|string $num, int $exponent): GMP {}
53
54function gmp_powm(GMP|int|string $num, GMP|int|string $exponent, GMP|int|string $modulus): GMP {}
55
56function gmp_perfect_square(GMP|int|string $num): bool {}
57
58function gmp_perfect_power(GMP|int|string $num): bool {}
59
60function gmp_prob_prime(GMP|int|string $num, int $repetitions = 10): int {}
61
62function gmp_gcd(GMP|int|string $num1, GMP|int|string $num2): GMP {}
63
64function gmp_gcdext(GMP|int|string $num1, GMP|int|string $num2): array {}
65
66function gmp_lcm(GMP|int|string $num1, GMP|int|string $num2): GMP {}
67
68function gmp_invert(GMP|int|string $num1, GMP|int|string $num2): GMP|false {}
69
70function gmp_jacobi(GMP|int|string $num1, GMP|int|string $num2): int {}
71
72function gmp_legendre(GMP|int|string $num1, GMP|int|string $num2): int {}
73
74function gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int {}
75
76function gmp_cmp(GMP|int|string $num1, GMP|int|string $num2): int {}
77
78function gmp_sign(GMP|int|string $num): int {}
79
80function gmp_random_seed(GMP|int|string $seed): void {}
81
82function gmp_random_bits(int $bits): GMP {}
83
84function gmp_random_range(GMP|int|string $min, GMP|int|string $max): GMP {}
85
86function gmp_and(GMP|int|string $num1, GMP|int|string $num2): GMP {}
87
88function gmp_or(GMP|int|string $num1, GMP|int|string $num2): GMP {}
89
90function gmp_com(GMP|int|string $num): GMP {}
91
92function gmp_xor(GMP|int|string $num1, GMP|int|string $num2): GMP {}
93
94function gmp_setbit(GMP $num, int $index, bool $value = true): void {}
95
96function gmp_clrbit(GMP $num, int $index): void {}
97
98function gmp_testbit(GMP|int|string $num, int $index): bool {}
99
100function gmp_scan0(GMP|int|string $num1, int $start): int {}
101
102function gmp_scan1(GMP|int|string $num1, int $start): int {}
103
104function gmp_popcount(GMP|int|string $num): int {}
105
106function gmp_hamdist(GMP|int|string $num1, GMP|int|string $num2): int {}
107
108function gmp_nextprime(GMP|int|string $num): GMP {}
109
110function gmp_binomial(GMP|int|string $n, int $k): GMP {}
111