1use crate::deps::*;
4use crate::flint::*;
5use crate::fmpz_types::*;
6
7
8extern "C" {
9 #[link_name = "fmpzi_init__extern"]
10 pub fn fmpzi_init(x: *mut fmpzi_struct);
11 #[link_name = "fmpzi_clear__extern"]
12 pub fn fmpzi_clear(x: *mut fmpzi_struct);
13 #[link_name = "fmpzi_equal__extern"]
14 pub fn fmpzi_equal(x: *const fmpzi_struct, y: *const fmpzi_struct) -> libc::c_int;
15 #[link_name = "fmpzi_zero__extern"]
16 pub fn fmpzi_zero(x: *mut fmpzi_struct);
17 #[link_name = "fmpzi_one__extern"]
18 pub fn fmpzi_one(x: *mut fmpzi_struct);
19 #[link_name = "fmpzi_set__extern"]
20 pub fn fmpzi_set(res: *mut fmpzi_struct, x: *const fmpzi_struct);
21 #[link_name = "fmpzi_conj__extern"]
22 pub fn fmpzi_conj(res: *mut fmpzi_struct, x: *const fmpzi_struct);
23 #[link_name = "fmpzi_swap__extern"]
24 pub fn fmpzi_swap(x: *mut fmpzi_struct, y: *mut fmpzi_struct);
25 pub fn fmpzi_print(x: *const fmpzi_struct);
26 #[link_name = "fmpzi_set_si_si__extern"]
27 pub fn fmpzi_set_si_si(res: *mut fmpzi_struct, a: slong, b: slong);
28 #[link_name = "fmpzi_randtest__extern"]
29 pub fn fmpzi_randtest(
30 res: *mut fmpzi_struct,
31 state: *mut flint_rand_struct,
32 bits: flint_bitcnt_t,
33 );
34 #[link_name = "fmpzi_is_unit__extern"]
35 pub fn fmpzi_is_unit(x: *const fmpzi_struct) -> libc::c_int;
36 #[link_name = "fmpzi_is_zero__extern"]
37 pub fn fmpzi_is_zero(x: *const fmpzi_struct) -> libc::c_int;
38 #[link_name = "fmpzi_is_one__extern"]
39 pub fn fmpzi_is_one(x: *const fmpzi_struct) -> libc::c_int;
40 pub fn fmpzi_bits(x: *const fmpzi_struct) -> slong;
41 #[link_name = "fmpzi_norm__extern"]
42 pub fn fmpzi_norm(res: *mut fmpz, x: *const fmpzi_struct);
43 #[link_name = "fmpzi_neg__extern"]
44 pub fn fmpzi_neg(res: *mut fmpzi_struct, x: *const fmpzi_struct);
45 #[link_name = "fmpzi_add__extern"]
46 pub fn fmpzi_add(res: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
47 #[link_name = "fmpzi_sub__extern"]
48 pub fn fmpzi_sub(res: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
49 pub fn fmpzi_sqr(res: *mut fmpzi_struct, x: *const fmpzi_struct);
50 pub fn fmpzi_mul(res: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
51 pub fn fmpzi_pow_ui(res: *mut fmpzi_struct, x: *const fmpzi_struct, exp: ulong);
52 pub fn fmpzi_mul_i(z: *mut fmpzi_struct, x: *const fmpzi_struct);
53 pub fn fmpzi_div_i(z: *mut fmpzi_struct, x: *const fmpzi_struct);
54 pub fn fmpzi_mul_i_pow_si(res: *mut fmpzi_struct, z: *const fmpzi_struct, k: slong);
55 pub fn fmpzi_canonical_unit_i_pow(x: *const fmpzi_struct) -> slong;
56 #[link_name = "fmpzi_canonicalise_unit__extern"]
57 pub fn fmpzi_canonicalise_unit(res: *mut fmpzi_struct, x: *const fmpzi_struct);
58 pub fn fmpzi_divrem(
59 q: *mut fmpzi_struct,
60 r: *mut fmpzi_struct,
61 x: *const fmpzi_struct,
62 y: *const fmpzi_struct,
63 );
64 pub fn fmpzi_divrem_approx(
65 q: *mut fmpzi_struct,
66 r: *mut fmpzi_struct,
67 x: *const fmpzi_struct,
68 y: *const fmpzi_struct,
69 );
70 pub fn fmpzi_divexact(q: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
71 pub fn fmpzi_remove_one_plus_i(res: *mut fmpzi_struct, x: *const fmpzi_struct) -> slong;
72 pub fn fmpzi_gcd_euclidean(
73 res: *mut fmpzi_struct,
74 x: *const fmpzi_struct,
75 y: *const fmpzi_struct,
76 );
77 pub fn fmpzi_gcd_euclidean_improved(
78 res: *mut fmpzi_struct,
79 x: *const fmpzi_struct,
80 y: *const fmpzi_struct,
81 );
82 pub fn fmpzi_gcd_binary(res: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
83 pub fn fmpzi_gcd_shortest(g: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
84 pub fn fmpzi_gcd(g: *mut fmpzi_struct, x: *const fmpzi_struct, y: *const fmpzi_struct);
85 pub fn fmpzi_is_prime(n: *const fmpzi_struct) -> libc::c_int;
86 pub fn fmpzi_is_probabprime(n: *const fmpzi_struct) -> libc::c_int;
87}