Skip to main content

flint_sys/
mag.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use libc::*;
4use crate::deps::*;
5use crate::arb_types::*;
6use crate::flint::*;
7
8
9pub const MAG_BITS: u32 = 30;
10extern "C" {
11    #[link_name = "_fmpz_set_fast__extern"]
12    pub fn _fmpz_set_fast(f: *mut fmpz, g: *const fmpz);
13    #[link_name = "_fmpz_add_fast__extern"]
14    pub fn _fmpz_add_fast(z: *mut fmpz, x: *const fmpz, c: slong);
15    #[link_name = "_fmpz_add2_fast__extern"]
16    pub fn _fmpz_add2_fast(z: *mut fmpz, x: *const fmpz, y: *const fmpz, c: slong);
17    #[link_name = "_fmpz_sub2_fast__extern"]
18    pub fn _fmpz_sub2_fast(z: *mut fmpz, x: *const fmpz, y: *const fmpz, c: slong);
19    #[link_name = "mag_init__extern"]
20    pub fn mag_init(x: *mut mag_struct);
21    #[link_name = "mag_init_set__extern"]
22    pub fn mag_init_set(x: *mut mag_struct, y: *const mag_struct);
23    pub fn mag_clear(x: *mut mag_struct);
24    #[link_name = "mag_swap__extern"]
25    pub fn mag_swap(x: *mut mag_struct, y: *mut mag_struct);
26    #[link_name = "mag_set__extern"]
27    pub fn mag_set(x: *mut mag_struct, y: *const mag_struct);
28    #[link_name = "mag_zero__extern"]
29    pub fn mag_zero(x: *mut mag_struct);
30    #[link_name = "mag_one__extern"]
31    pub fn mag_one(x: *mut mag_struct);
32    #[link_name = "mag_is_special__extern"]
33    pub fn mag_is_special(x: *const mag_struct) -> libc::c_int;
34    #[link_name = "mag_is_zero__extern"]
35    pub fn mag_is_zero(x: *const mag_struct) -> libc::c_int;
36    #[link_name = "mag_inf__extern"]
37    pub fn mag_inf(x: *mut mag_struct);
38    #[link_name = "mag_is_inf__extern"]
39    pub fn mag_is_inf(x: *const mag_struct) -> libc::c_int;
40    #[link_name = "mag_is_finite__extern"]
41    pub fn mag_is_finite(x: *const mag_struct) -> libc::c_int;
42    #[link_name = "mag_equal__extern"]
43    pub fn mag_equal(x: *const mag_struct, y: *const mag_struct) -> libc::c_int;
44    pub fn mag_mul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
45    pub fn mag_mul_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
46    pub fn mag_addmul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
47    pub fn mag_add_2exp_fmpz(z: *mut mag_struct, x: *const mag_struct, e: *const fmpz);
48    pub fn mag_add(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
49    pub fn mag_add_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
50    pub fn mag_add_ui(z: *mut mag_struct, x: *const mag_struct, y: ulong);
51    pub fn mag_add_ui_lower(res: *mut mag_struct, x: *const mag_struct, y: ulong);
52    pub fn mag_add_ui_2exp_si(z: *mut mag_struct, x: *const mag_struct, y: ulong, e: slong);
53    pub fn mag_div(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
54    pub fn mag_div_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
55    #[link_name = "mag_inv__extern"]
56    pub fn mag_inv(res: *mut mag_struct, x: *const mag_struct);
57    #[link_name = "mag_inv_lower__extern"]
58    pub fn mag_inv_lower(res: *mut mag_struct, x: *const mag_struct);
59    pub fn mag_mul_2exp_si(z: *mut mag_struct, x: *const mag_struct, y: slong);
60    pub fn mag_mul_2exp_fmpz(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
61    pub fn mag_sub(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
62    pub fn mag_sub_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
63    #[link_name = "mag_fast_init_set__extern"]
64    pub fn mag_fast_init_set(x: *mut mag_struct, y: *const mag_struct);
65    #[link_name = "mag_fast_zero__extern"]
66    pub fn mag_fast_zero(x: *mut mag_struct);
67    #[link_name = "mag_fast_is_zero__extern"]
68    pub fn mag_fast_is_zero(x: *const mag_struct) -> libc::c_int;
69    #[link_name = "mag_fast_mul__extern"]
70    pub fn mag_fast_mul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
71    #[link_name = "mag_fast_mul_2exp_si__extern"]
72    pub fn mag_fast_mul_2exp_si(z: *mut mag_struct, x: *const mag_struct, y: slong);
73    #[link_name = "mag_fast_addmul__extern"]
74    pub fn mag_fast_addmul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
75    #[link_name = "mag_fast_add_2exp_si__extern"]
76    pub fn mag_fast_add_2exp_si(z: *mut mag_struct, x: *const mag_struct, e: slong);
77    pub fn mag_set_d(z: *mut mag_struct, x: f64);
78    pub fn mag_set_d_lower(z: *mut mag_struct, x: f64);
79    pub fn mag_set_d_2exp_fmpz(z: *mut mag_struct, c: f64, exp: *const fmpz);
80    pub fn mag_set_d_2exp_fmpz_lower(z: *mut mag_struct, c: f64, exp: *const fmpz);
81    pub fn mag_set_fmpz_2exp_fmpz(z: *mut mag_struct, man: *const fmpz, exp: *const fmpz);
82    pub fn mag_randtest_special(x: *mut mag_struct, state: *mut flint_rand_struct, expbits: slong);
83    pub fn mag_randtest(x: *mut mag_struct, state: *mut flint_rand_struct, expbits: slong);
84    pub fn mag_fprint(file: *mut FILE, x: *const mag_struct);
85    pub fn mag_fprintd(file: *mut FILE, x: *const mag_struct, d: slong);
86    pub fn mag_print(x: *const mag_struct);
87    pub fn mag_printd(x: *const mag_struct, d: slong);
88    pub fn mag_get_fmpq(y: *mut fmpq, x: *const mag_struct);
89    pub fn mag_get_fmpz(res: *mut fmpz, x: *const mag_struct);
90    pub fn mag_get_fmpz_lower(res: *mut fmpz, x: *const mag_struct);
91    pub fn mag_cmp(x: *const mag_struct, y: *const mag_struct) -> libc::c_int;
92    pub fn mag_cmp_2exp_si(x: *const mag_struct, e: slong) -> libc::c_int;
93    #[link_name = "mag_min__extern"]
94    pub fn mag_min(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
95    #[link_name = "mag_max__extern"]
96    pub fn mag_max(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
97    #[link_name = "_mag_vec_init__extern"]
98    pub fn _mag_vec_init(n: slong) -> mag_ptr;
99    #[link_name = "_mag_vec_clear__extern"]
100    pub fn _mag_vec_clear(v: mag_ptr, n: slong);
101    pub fn mag_get_d(z: *const mag_struct) -> f64;
102    pub fn mag_get_d_log2_approx(x: *const mag_struct) -> f64;
103    pub fn mag_d_log_upper_bound(x: f64) -> f64;
104    pub fn mag_d_log_lower_bound(x: f64) -> f64;
105    pub fn mag_log1p(z: *mut mag_struct, x: *const mag_struct);
106    pub fn mag_log_ui(t: *mut mag_struct, n: ulong);
107    pub fn mag_log(z: *mut mag_struct, x: *const mag_struct);
108    pub fn mag_log_lower(z: *mut mag_struct, x: *const mag_struct);
109    pub fn mag_neg_log(z: *mut mag_struct, x: *const mag_struct);
110    pub fn mag_neg_log_lower(z: *mut mag_struct, x: *const mag_struct);
111    pub fn mag_exp(y: *mut mag_struct, x: *const mag_struct);
112    pub fn mag_exp_lower(y: *mut mag_struct, x: *const mag_struct);
113    pub fn mag_expinv(res: *mut mag_struct, x: *const mag_struct);
114    pub fn mag_expinv_lower(y: *mut mag_struct, x: *const mag_struct);
115    pub fn mag_expm1(y: *mut mag_struct, x: *const mag_struct);
116    pub fn mag_exp_tail(z: *mut mag_struct, x: *const mag_struct, N: ulong);
117    pub fn mag_sinh(y: *mut mag_struct, x: *const mag_struct);
118    pub fn mag_sinh_lower(y: *mut mag_struct, x: *const mag_struct);
119    pub fn mag_cosh(y: *mut mag_struct, x: *const mag_struct);
120    pub fn mag_cosh_lower(y: *mut mag_struct, x: *const mag_struct);
121    pub fn mag_pow_ui(z: *mut mag_struct, x: *const mag_struct, e: ulong);
122    pub fn mag_pow_ui_lower(z: *mut mag_struct, x: *const mag_struct, e: ulong);
123    pub fn mag_pow_fmpz(z: *mut mag_struct, x: *const mag_struct, e: *const fmpz);
124    pub fn mag_pow_fmpz_lower(z: *mut mag_struct, x: *const mag_struct, e: *const fmpz);
125    pub fn mag_const_pi(res: *mut mag_struct);
126    pub fn mag_const_pi_lower(res: *mut mag_struct);
127    pub fn mag_atan(res: *mut mag_struct, x: *const mag_struct);
128    pub fn mag_atan_lower(res: *mut mag_struct, x: *const mag_struct);
129    pub fn mag_fac_ui(z: *mut mag_struct, n: ulong);
130    pub fn mag_rfac_ui(z: *mut mag_struct, n: ulong);
131    pub fn mag_bin_uiui(res: *mut mag_struct, n: ulong, k: ulong);
132    pub fn mag_bernoulli_div_fac_ui(z: *mut mag_struct, n: ulong);
133    pub fn mag_set_fmpz_2exp_fmpz_lower(z: *mut mag_struct, man: *const fmpz, exp: *const fmpz);
134    pub fn mag_sqrt(y: *mut mag_struct, x: *const mag_struct);
135    pub fn mag_sqrt_lower(y: *mut mag_struct, x: *const mag_struct);
136    pub fn mag_rsqrt(y: *mut mag_struct, x: *const mag_struct);
137    pub fn mag_rsqrt_lower(y: *mut mag_struct, x: *const mag_struct);
138    pub fn mag_root(y: *mut mag_struct, x: *const mag_struct, n: ulong);
139    pub fn mag_hypot(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
140    pub fn mag_binpow_uiui(b: *mut mag_struct, m: ulong, n: ulong);
141    pub fn mag_polylog_tail(
142        u: *mut mag_struct,
143        z: *const mag_struct,
144        sigma: slong,
145        d: ulong,
146        N: ulong,
147    );
148    pub fn mag_geom_series(res: *mut mag_struct, x: *const mag_struct, n: ulong);
149    pub fn mag_hurwitz_zeta_uiui(res: *mut mag_struct, s: ulong, a: ulong);
150    pub fn mag_set_ui(z: *mut mag_struct, x: ulong);
151    pub fn mag_set_ui_lower(z: *mut mag_struct, x: ulong);
152    pub fn mag_set_ui_2exp_si(z: *mut mag_struct, v: ulong, e: slong);
153    #[link_name = "mag_set_fmpz__extern"]
154    pub fn mag_set_fmpz(z: *mut mag_struct, x: *const fmpz);
155    #[link_name = "mag_set_fmpz_lower__extern"]
156    pub fn mag_set_fmpz_lower(z: *mut mag_struct, x: *const fmpz);
157    #[link_name = "mag_mul_ui__extern"]
158    pub fn mag_mul_ui(z: *mut mag_struct, x: *const mag_struct, y: ulong);
159    #[link_name = "mag_mul_ui_lower__extern"]
160    pub fn mag_mul_ui_lower(z: *mut mag_struct, x: *const mag_struct, y: ulong);
161    #[link_name = "mag_mul_fmpz__extern"]
162    pub fn mag_mul_fmpz(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
163    #[link_name = "mag_mul_fmpz_lower__extern"]
164    pub fn mag_mul_fmpz_lower(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
165    #[link_name = "mag_div_ui__extern"]
166    pub fn mag_div_ui(z: *mut mag_struct, x: *const mag_struct, y: ulong);
167    #[link_name = "mag_div_fmpz__extern"]
168    pub fn mag_div_fmpz(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
169    #[link_name = "mag_allocated_bytes__extern"]
170    pub fn mag_allocated_bytes(x: *const mag_struct) -> slong;
171    pub fn mag_load_str(res: *mut mag_struct, data: *const libc::c_char) -> libc::c_int;
172    pub fn mag_dump_str(x: *const mag_struct) -> *mut libc::c_char;
173    pub fn mag_load_file(res: *mut mag_struct, stream: *mut FILE) -> libc::c_int;
174    pub fn mag_dump_file(stream: *mut FILE, x: *const mag_struct) -> libc::c_int;
175}