1use libc::*;
4use crate::deps::*;
5use crate::arb_types::*;
6use crate::arf_types::*;
7use crate::flint::*;
8
9
10pub const ARF_RESULT_EXACT: u32 = 0;
11pub const ARF_RESULT_INEXACT: u32 = 1;
12pub const ARF_EXP_ZERO: u32 = 0;
13pub const MUL_MPFR_MIN_LIMBS: u32 = 25;
14pub const MUL_MPFR_MAX_LIMBS: u32 = 10000;
15pub const ARF_MUL_STACK_ALLOC: u32 = 40;
16pub const ARF_MUL_TLS_ALLOC: u32 = 1000;
17pub const ARF_ADD_STACK_ALLOC: u32 = 40;
18pub const ARF_ADD_TLS_ALLOC: u32 = 1000;
19pub const arf_rnd_t_ARF_RND_DOWN: arf_rnd_t = 0;
20pub const arf_rnd_t_ARF_RND_UP: arf_rnd_t = 1;
21pub const arf_rnd_t_ARF_RND_FLOOR: arf_rnd_t = 2;
22pub const arf_rnd_t_ARF_RND_CEIL: arf_rnd_t = 3;
23pub const arf_rnd_t_ARF_RND_NEAR: arf_rnd_t = 4;
24pub type arf_rnd_t = libc::c_uint;
25extern "C" {
26 #[link_name = "arf_rounds_down__extern"]
27 pub fn arf_rounds_down(rnd: arf_rnd_t, sgnbit: libc::c_int) -> libc::c_int;
28 #[link_name = "arf_rounds_up__extern"]
29 pub fn arf_rounds_up(rnd: arf_rnd_t, sgnbit: libc::c_int) -> libc::c_int;
30 #[link_name = "arf_rnd_to_mpfr__extern"]
31 pub fn arf_rnd_to_mpfr(rnd: arf_rnd_t) -> mpfr_rnd_t;
32 pub fn _arf_promote(x: *mut arf_struct, n: slong);
33 pub fn _arf_demote(x: *mut arf_struct);
34 #[link_name = "arf_init__extern"]
35 pub fn arf_init(x: *mut arf_struct);
36 pub fn arf_clear(x: *mut arf_struct);
37 pub fn _arf_vec_init(n: slong) -> arf_ptr;
38 pub fn _arf_vec_clear(v: arf_ptr, n: slong);
39 #[link_name = "arf_zero__extern"]
40 pub fn arf_zero(x: *mut arf_struct);
41 #[link_name = "arf_pos_inf__extern"]
42 pub fn arf_pos_inf(x: *mut arf_struct);
43 #[link_name = "arf_neg_inf__extern"]
44 pub fn arf_neg_inf(x: *mut arf_struct);
45 #[link_name = "arf_nan__extern"]
46 pub fn arf_nan(x: *mut arf_struct);
47 #[link_name = "arf_is_special__extern"]
48 pub fn arf_is_special(x: *const arf_struct) -> libc::c_int;
49 #[link_name = "arf_is_zero__extern"]
50 pub fn arf_is_zero(x: *const arf_struct) -> libc::c_int;
51 #[link_name = "arf_is_pos_inf__extern"]
52 pub fn arf_is_pos_inf(x: *const arf_struct) -> libc::c_int;
53 #[link_name = "arf_is_neg_inf__extern"]
54 pub fn arf_is_neg_inf(x: *const arf_struct) -> libc::c_int;
55 #[link_name = "arf_is_nan__extern"]
56 pub fn arf_is_nan(x: *const arf_struct) -> libc::c_int;
57 #[link_name = "arf_is_normal__extern"]
58 pub fn arf_is_normal(x: *const arf_struct) -> libc::c_int;
59 #[link_name = "arf_is_finite__extern"]
60 pub fn arf_is_finite(x: *const arf_struct) -> libc::c_int;
61 #[link_name = "arf_is_inf__extern"]
62 pub fn arf_is_inf(x: *const arf_struct) -> libc::c_int;
63 #[link_name = "arf_one__extern"]
64 pub fn arf_one(x: *mut arf_struct);
65 #[link_name = "arf_is_one__extern"]
66 pub fn arf_is_one(x: *const arf_struct) -> libc::c_int;
67 #[link_name = "arf_sgn__extern"]
68 pub fn arf_sgn(x: *const arf_struct) -> libc::c_int;
69 pub fn arf_cmp(x: *const arf_struct, y: *const arf_struct) -> libc::c_int;
70 pub fn arf_cmpabs(x: *const arf_struct, y: *const arf_struct) -> libc::c_int;
71 pub fn arf_cmpabs_ui(x: *const arf_struct, y: ulong) -> libc::c_int;
72 pub fn arf_cmpabs_d(x: *const arf_struct, y: f64) -> libc::c_int;
73 pub fn arf_cmp_si(x: *const arf_struct, y: slong) -> libc::c_int;
74 pub fn arf_cmp_ui(x: *const arf_struct, y: ulong) -> libc::c_int;
75 pub fn arf_cmp_d(x: *const arf_struct, y: f64) -> libc::c_int;
76 #[link_name = "arf_swap__extern"]
77 pub fn arf_swap(y: *mut arf_struct, x: *mut arf_struct);
78 pub fn arf_set(y: *mut arf_struct, x: *const arf_struct);
79 #[link_name = "arf_neg__extern"]
80 pub fn arf_neg(y: *mut arf_struct, x: *const arf_struct);
81 #[link_name = "arf_init_set_ui__extern"]
82 pub fn arf_init_set_ui(x: *mut arf_struct, v: ulong);
83 #[link_name = "arf_init_set_si__extern"]
84 pub fn arf_init_set_si(x: *mut arf_struct, v: slong);
85 #[link_name = "arf_set_ui__extern"]
86 pub fn arf_set_ui(x: *mut arf_struct, v: ulong);
87 #[link_name = "arf_set_si__extern"]
88 pub fn arf_set_si(x: *mut arf_struct, v: slong);
89 #[link_name = "arf_init_set_shallow__extern"]
90 pub fn arf_init_set_shallow(z: *mut arf_struct, x: *const arf_struct);
91 #[link_name = "arf_init_neg_shallow__extern"]
92 pub fn arf_init_neg_shallow(z: *mut arf_struct, x: *const arf_struct);
93 #[link_name = "arf_init_set_mag_shallow__extern"]
94 pub fn arf_init_set_mag_shallow(y: *mut arf_struct, x: *const mag_struct);
95 #[link_name = "arf_init_neg_mag_shallow__extern"]
96 pub fn arf_init_neg_mag_shallow(z: *mut arf_struct, x: *const mag_struct);
97 #[link_name = "arf_cmpabs_mag__extern"]
98 pub fn arf_cmpabs_mag(x: *const arf_struct, y: *const mag_struct) -> libc::c_int;
99 #[link_name = "arf_mag_cmpabs__extern"]
100 pub fn arf_mag_cmpabs(x: *const mag_struct, y: *const arf_struct) -> libc::c_int;
101 pub fn arf_set_mpn(y: *mut arf_struct, x: nn_srcptr, xn: slong, sgnbit: libc::c_int);
102 #[link_name = "arf_set_mpz__extern"]
103 pub fn arf_set_mpz(y: *mut arf_struct, x: *const __mpz_struct);
104 #[link_name = "arf_set_fmpz__extern"]
105 pub fn arf_set_fmpz(y: *mut arf_struct, x: *const fmpz);
106 pub fn _arf_set_round_ui(
107 x: *mut arf_struct,
108 v: ulong,
109 sgnbit: libc::c_int,
110 prec: slong,
111 rnd: arf_rnd_t,
112 ) -> libc::c_int;
113 pub fn _arf_set_round_uiui(
114 z: *mut arf_struct,
115 fix: *mut slong,
116 hi: ulong,
117 lo: ulong,
118 sgnbit: libc::c_int,
119 prec: slong,
120 rnd: arf_rnd_t,
121 ) -> libc::c_int;
122 pub fn _arf_set_round_mpn(
123 y: *mut arf_struct,
124 exp_shift: *mut slong,
125 x: nn_srcptr,
126 xn: slong,
127 sgnbit: libc::c_int,
128 prec: slong,
129 rnd: arf_rnd_t,
130 ) -> libc::c_int;
131 #[link_name = "arf_set_round_ui__extern"]
132 pub fn arf_set_round_ui(
133 x: *mut arf_struct,
134 v: ulong,
135 prec: slong,
136 rnd: arf_rnd_t,
137 ) -> libc::c_int;
138 #[link_name = "arf_set_round_si__extern"]
139 pub fn arf_set_round_si(
140 x: *mut arf_struct,
141 v: slong,
142 prec: slong,
143 rnd: arf_rnd_t,
144 ) -> libc::c_int;
145 #[link_name = "arf_set_round_mpz__extern"]
146 pub fn arf_set_round_mpz(
147 y: *mut arf_struct,
148 x: *const __mpz_struct,
149 prec: slong,
150 rnd: arf_rnd_t,
151 ) -> libc::c_int;
152 #[link_name = "arf_set_round_fmpz__extern"]
153 pub fn arf_set_round_fmpz(
154 y: *mut arf_struct,
155 x: *const fmpz,
156 prec: slong,
157 rnd: arf_rnd_t,
158 ) -> libc::c_int;
159 pub fn arf_set_round(
160 y: *mut arf_struct,
161 x: *const arf_struct,
162 prec: slong,
163 rnd: arf_rnd_t,
164 ) -> libc::c_int;
165 pub fn arf_neg_round(
166 y: *mut arf_struct,
167 x: *const arf_struct,
168 prec: slong,
169 rnd: arf_rnd_t,
170 ) -> libc::c_int;
171 pub fn arf_get_mpfr(
172 x: *mut __mpfr_struct,
173 y: *const arf_struct,
174 rnd: mpfr_rnd_t,
175 ) -> libc::c_int;
176 pub fn arf_set_mpfr(x: *mut arf_struct, y: *const __mpfr_struct);
177 pub fn _arf_call_mpfr_func(
178 r1: arf_ptr,
179 r2: arf_ptr,
180 func: ::std::option::Option<unsafe extern "C" fn() -> libc::c_int>,
181 x: arf_srcptr,
182 y: arf_srcptr,
183 prec: slong,
184 rnd: arf_rnd_t,
185 ) -> libc::c_int;
186 pub fn arf_equal(x: *const arf_struct, y: *const arf_struct) -> libc::c_int;
187 pub fn arf_equal_si(x: *const arf_struct, y: slong) -> libc::c_int;
188 pub fn arf_equal_ui(x: *const arf_struct, y: ulong) -> libc::c_int;
189 pub fn arf_equal_d(x: *const arf_struct, y: f64) -> libc::c_int;
190 #[link_name = "arf_min__extern"]
191 pub fn arf_min(z: *mut arf_struct, a: *const arf_struct, b: *const arf_struct);
192 #[link_name = "arf_max__extern"]
193 pub fn arf_max(z: *mut arf_struct, a: *const arf_struct, b: *const arf_struct);
194 #[link_name = "arf_abs__extern"]
195 pub fn arf_abs(y: *mut arf_struct, x: *const arf_struct);
196 #[link_name = "arf_bits__extern"]
197 pub fn arf_bits(x: *const arf_struct) -> slong;
198 #[link_name = "arf_bot__extern"]
199 pub fn arf_bot(e: *mut fmpz, x: *const arf_struct);
200 pub fn arf_is_int(x: *const arf_struct) -> libc::c_int;
201 pub fn arf_is_int_2exp_si(x: *const arf_struct, e: slong) -> libc::c_int;
202 pub fn arf_cmp_2exp_si(x: *const arf_struct, e: slong) -> libc::c_int;
203 pub fn arf_cmpabs_2exp_si(x: *const arf_struct, e: slong) -> libc::c_int;
204 #[link_name = "arf_set_si_2exp_si__extern"]
205 pub fn arf_set_si_2exp_si(x: *mut arf_struct, man: slong, exp: slong);
206 #[link_name = "arf_set_ui_2exp_si__extern"]
207 pub fn arf_set_ui_2exp_si(x: *mut arf_struct, man: ulong, exp: slong);
208 #[link_name = "arf_mul_2exp_si__extern"]
209 pub fn arf_mul_2exp_si(y: *mut arf_struct, x: *const arf_struct, e: slong);
210 #[link_name = "arf_mul_2exp_fmpz__extern"]
211 pub fn arf_mul_2exp_fmpz(y: *mut arf_struct, x: *const arf_struct, e: *const fmpz);
212 #[link_name = "arf_set_round_fmpz_2exp__extern"]
213 pub fn arf_set_round_fmpz_2exp(
214 y: *mut arf_struct,
215 x: *const fmpz,
216 exp: *const fmpz,
217 prec: slong,
218 rnd: arf_rnd_t,
219 ) -> libc::c_int;
220 #[link_name = "arf_abs_bound_lt_2exp_fmpz__extern"]
221 pub fn arf_abs_bound_lt_2exp_fmpz(b: *mut fmpz, x: *const arf_struct);
222 #[link_name = "arf_abs_bound_le_2exp_fmpz__extern"]
223 pub fn arf_abs_bound_le_2exp_fmpz(b: *mut fmpz, x: *const arf_struct);
224 pub fn arf_abs_bound_lt_2exp_si(x: *const arf_struct) -> slong;
225 pub fn arf_frexp(man: *mut arf_struct, exp: *mut fmpz, x: *const arf_struct);
226 pub fn arf_get_fmpz_2exp(man: *mut fmpz, exp: *mut fmpz, x: *const arf_struct);
227 pub fn _arf_get_integer_mpn(y: nn_ptr, x: nn_srcptr, xn: slong, exp: slong) -> libc::c_int;
228 pub fn _arf_set_mpn_fixed(
229 z: *mut arf_struct,
230 xp: nn_srcptr,
231 xn: slong,
232 fixn: slong,
233 negative: libc::c_int,
234 prec: slong,
235 rnd: arf_rnd_t,
236 ) -> libc::c_int;
237 pub fn arf_get_fmpz(z: *mut fmpz, x: *const arf_struct, rnd: arf_rnd_t) -> libc::c_int;
238 pub fn arf_get_si(x: *const arf_struct, rnd: arf_rnd_t) -> slong;
239 pub fn arf_get_fmpz_fixed_fmpz(
240 y: *mut fmpz,
241 x: *const arf_struct,
242 e: *const fmpz,
243 ) -> libc::c_int;
244 pub fn arf_get_fmpz_fixed_si(y: *mut fmpz, x: *const arf_struct, e: slong) -> libc::c_int;
245 #[link_name = "arf_set_fmpz_2exp__extern"]
246 pub fn arf_set_fmpz_2exp(x: *mut arf_struct, man: *const fmpz, exp: *const fmpz);
247 pub fn arf_floor(z: *mut arf_struct, x: *const arf_struct);
248 pub fn arf_ceil(z: *mut arf_struct, x: *const arf_struct);
249 pub fn arf_nint(z: *mut arf_struct, x: *const arf_struct);
250 pub fn arf_debug(x: *const arf_struct);
251 pub fn arf_get_str(x: *const arf_struct, d: slong) -> *mut libc::c_char;
252 pub fn arf_fprint(file: *mut FILE, x: *const arf_struct);
253 pub fn arf_fprintd(file: *mut FILE, y: *const arf_struct, d: slong);
254 pub fn arf_print(x: *const arf_struct);
255 pub fn arf_printd(y: *const arf_struct, d: slong);
256 pub fn arf_randtest(
257 x: *mut arf_struct,
258 state: *mut flint_rand_struct,
259 bits: slong,
260 mag_bits: slong,
261 );
262 pub fn arf_randtest_not_zero(
263 x: *mut arf_struct,
264 state: *mut flint_rand_struct,
265 bits: slong,
266 mag_bits: slong,
267 );
268 pub fn arf_randtest_special(
269 x: *mut arf_struct,
270 state: *mut flint_rand_struct,
271 bits: slong,
272 mag_bits: slong,
273 );
274 pub fn arf_urandom(
275 x: *mut arf_struct,
276 state: *mut flint_rand_struct,
277 bits: slong,
278 rnd: arf_rnd_t,
279 );
280 pub static mut __arf_mul_tmp: nn_ptr;
281 pub static mut __arf_mul_alloc: slong;
282 pub fn _arf_mul_tmp_cleanup();
283 pub fn arf_mul_special(z: *mut arf_struct, x: *const arf_struct, y: *const arf_struct);
284 pub fn arf_mul_via_mpfr(
285 z: *mut arf_struct,
286 x: *const arf_struct,
287 y: *const arf_struct,
288 prec: slong,
289 rnd: arf_rnd_t,
290 ) -> libc::c_int;
291 pub fn arf_mul_rnd_any(
292 z: arf_ptr,
293 x: arf_srcptr,
294 y: arf_srcptr,
295 prec: slong,
296 rnd: arf_rnd_t,
297 ) -> libc::c_int;
298 pub fn arf_mul_rnd_down(z: arf_ptr, x: arf_srcptr, y: arf_srcptr, prec: slong) -> libc::c_int;
299 #[link_name = "arf_neg_mul__extern"]
300 pub fn arf_neg_mul(
301 z: *mut arf_struct,
302 x: *const arf_struct,
303 y: *const arf_struct,
304 prec: slong,
305 rnd: arf_rnd_t,
306 ) -> libc::c_int;
307 #[link_name = "arf_mul_ui__extern"]
308 pub fn arf_mul_ui(
309 z: arf_ptr,
310 x: arf_srcptr,
311 y: ulong,
312 prec: slong,
313 rnd: arf_rnd_t,
314 ) -> libc::c_int;
315 #[link_name = "arf_mul_si__extern"]
316 pub fn arf_mul_si(
317 z: arf_ptr,
318 x: arf_srcptr,
319 y: slong,
320 prec: slong,
321 rnd: arf_rnd_t,
322 ) -> libc::c_int;
323 pub fn arf_mul_mpz(
324 z: arf_ptr,
325 x: arf_srcptr,
326 y: *const __mpz_struct,
327 prec: slong,
328 rnd: arf_rnd_t,
329 ) -> libc::c_int;
330 #[link_name = "arf_mul_fmpz__extern"]
331 pub fn arf_mul_fmpz(
332 z: arf_ptr,
333 x: arf_srcptr,
334 y: *const fmpz,
335 prec: slong,
336 rnd: arf_rnd_t,
337 ) -> libc::c_int;
338 pub static mut __arf_add_tmp: nn_ptr;
339 pub static mut __arf_add_alloc: slong;
340 pub fn _arf_add_tmp_cleanup();
341 pub fn _arf_add_mpn(
342 z: *mut arf_struct,
343 xp: nn_srcptr,
344 xn: slong,
345 xsgnbit: libc::c_int,
346 xexp: *const fmpz,
347 yp: nn_srcptr,
348 yn: slong,
349 ysgnbit: libc::c_int,
350 shift: flint_bitcnt_t,
351 prec: slong,
352 rnd: arf_rnd_t,
353 ) -> libc::c_int;
354 pub fn arf_add(
355 z: arf_ptr,
356 x: arf_srcptr,
357 y: arf_srcptr,
358 prec: slong,
359 rnd: arf_rnd_t,
360 ) -> libc::c_int;
361 pub fn arf_add_si(
362 z: arf_ptr,
363 x: arf_srcptr,
364 y: slong,
365 prec: slong,
366 rnd: arf_rnd_t,
367 ) -> libc::c_int;
368 pub fn arf_add_ui(
369 z: arf_ptr,
370 x: arf_srcptr,
371 y: ulong,
372 prec: slong,
373 rnd: arf_rnd_t,
374 ) -> libc::c_int;
375 pub fn arf_add_fmpz(
376 z: arf_ptr,
377 x: arf_srcptr,
378 y: *const fmpz,
379 prec: slong,
380 rnd: arf_rnd_t,
381 ) -> libc::c_int;
382 pub fn arf_add_fmpz_2exp(
383 z: arf_ptr,
384 x: arf_srcptr,
385 y: *const fmpz,
386 exp: *const fmpz,
387 prec: slong,
388 rnd: arf_rnd_t,
389 ) -> libc::c_int;
390 pub fn arf_sub(
391 z: arf_ptr,
392 x: arf_srcptr,
393 y: arf_srcptr,
394 prec: slong,
395 rnd: arf_rnd_t,
396 ) -> libc::c_int;
397 pub fn arf_sub_si(
398 z: arf_ptr,
399 x: arf_srcptr,
400 y: slong,
401 prec: slong,
402 rnd: arf_rnd_t,
403 ) -> libc::c_int;
404 pub fn arf_sub_ui(
405 z: arf_ptr,
406 x: arf_srcptr,
407 y: ulong,
408 prec: slong,
409 rnd: arf_rnd_t,
410 ) -> libc::c_int;
411 pub fn arf_sub_fmpz(
412 z: arf_ptr,
413 x: arf_srcptr,
414 y: *const fmpz,
415 prec: slong,
416 rnd: arf_rnd_t,
417 ) -> libc::c_int;
418 pub fn arf_addmul(
419 z: arf_ptr,
420 x: arf_srcptr,
421 y: arf_srcptr,
422 prec: slong,
423 rnd: arf_rnd_t,
424 ) -> libc::c_int;
425 #[link_name = "arf_addmul_ui__extern"]
426 pub fn arf_addmul_ui(
427 z: arf_ptr,
428 x: arf_srcptr,
429 y: ulong,
430 prec: slong,
431 rnd: arf_rnd_t,
432 ) -> libc::c_int;
433 #[link_name = "arf_addmul_si__extern"]
434 pub fn arf_addmul_si(
435 z: arf_ptr,
436 x: arf_srcptr,
437 y: slong,
438 prec: slong,
439 rnd: arf_rnd_t,
440 ) -> libc::c_int;
441 pub fn arf_addmul_mpz(
442 z: arf_ptr,
443 x: arf_srcptr,
444 y: *const __mpz_struct,
445 prec: slong,
446 rnd: arf_rnd_t,
447 ) -> libc::c_int;
448 #[link_name = "arf_addmul_fmpz__extern"]
449 pub fn arf_addmul_fmpz(
450 z: arf_ptr,
451 x: arf_srcptr,
452 y: *const fmpz,
453 prec: slong,
454 rnd: arf_rnd_t,
455 ) -> libc::c_int;
456 pub fn arf_submul(
457 z: arf_ptr,
458 x: arf_srcptr,
459 y: arf_srcptr,
460 prec: slong,
461 rnd: arf_rnd_t,
462 ) -> libc::c_int;
463 #[link_name = "arf_submul_ui__extern"]
464 pub fn arf_submul_ui(
465 z: arf_ptr,
466 x: arf_srcptr,
467 y: ulong,
468 prec: slong,
469 rnd: arf_rnd_t,
470 ) -> libc::c_int;
471 #[link_name = "arf_submul_si__extern"]
472 pub fn arf_submul_si(
473 z: arf_ptr,
474 x: arf_srcptr,
475 y: slong,
476 prec: slong,
477 rnd: arf_rnd_t,
478 ) -> libc::c_int;
479 pub fn arf_submul_mpz(
480 z: arf_ptr,
481 x: arf_srcptr,
482 y: *const __mpz_struct,
483 prec: slong,
484 rnd: arf_rnd_t,
485 ) -> libc::c_int;
486 #[link_name = "arf_submul_fmpz__extern"]
487 pub fn arf_submul_fmpz(
488 z: arf_ptr,
489 x: arf_srcptr,
490 y: *const fmpz,
491 prec: slong,
492 rnd: arf_rnd_t,
493 ) -> libc::c_int;
494 pub fn arf_fma(
495 res: arf_ptr,
496 x: arf_srcptr,
497 y: arf_srcptr,
498 z: arf_srcptr,
499 prec: slong,
500 rnd: arf_rnd_t,
501 ) -> libc::c_int;
502 pub fn arf_sosq(
503 z: *mut arf_struct,
504 x: *const arf_struct,
505 y: *const arf_struct,
506 prec: slong,
507 rnd: arf_rnd_t,
508 ) -> libc::c_int;
509 pub fn arf_div(
510 z: arf_ptr,
511 x: arf_srcptr,
512 y: arf_srcptr,
513 prec: slong,
514 rnd: arf_rnd_t,
515 ) -> libc::c_int;
516 #[link_name = "arf_div_ui__extern"]
517 pub fn arf_div_ui(
518 z: arf_ptr,
519 x: arf_srcptr,
520 y: ulong,
521 prec: slong,
522 rnd: arf_rnd_t,
523 ) -> libc::c_int;
524 #[link_name = "arf_ui_div__extern"]
525 pub fn arf_ui_div(
526 z: arf_ptr,
527 x: ulong,
528 y: arf_srcptr,
529 prec: slong,
530 rnd: arf_rnd_t,
531 ) -> libc::c_int;
532 #[link_name = "arf_div_si__extern"]
533 pub fn arf_div_si(
534 z: arf_ptr,
535 x: arf_srcptr,
536 y: slong,
537 prec: slong,
538 rnd: arf_rnd_t,
539 ) -> libc::c_int;
540 #[link_name = "arf_si_div__extern"]
541 pub fn arf_si_div(
542 z: arf_ptr,
543 x: slong,
544 y: arf_srcptr,
545 prec: slong,
546 rnd: arf_rnd_t,
547 ) -> libc::c_int;
548 #[link_name = "arf_div_fmpz__extern"]
549 pub fn arf_div_fmpz(
550 z: arf_ptr,
551 x: arf_srcptr,
552 y: *const fmpz,
553 prec: slong,
554 rnd: arf_rnd_t,
555 ) -> libc::c_int;
556 #[link_name = "arf_fmpz_div__extern"]
557 pub fn arf_fmpz_div(
558 z: arf_ptr,
559 x: *const fmpz,
560 y: arf_srcptr,
561 prec: slong,
562 rnd: arf_rnd_t,
563 ) -> libc::c_int;
564 #[link_name = "arf_fmpz_div_fmpz__extern"]
565 pub fn arf_fmpz_div_fmpz(
566 z: arf_ptr,
567 x: *const fmpz,
568 y: *const fmpz,
569 prec: slong,
570 rnd: arf_rnd_t,
571 ) -> libc::c_int;
572 pub fn arf_sqrt(z: arf_ptr, x: arf_srcptr, prec: slong, rnd: arf_rnd_t) -> libc::c_int;
573 pub fn arf_sqrt_ui(z: *mut arf_struct, x: ulong, prec: slong, rnd: arf_rnd_t) -> libc::c_int;
574 pub fn arf_sqrt_fmpz(
575 z: *mut arf_struct,
576 x: *const fmpz,
577 prec: slong,
578 rnd: arf_rnd_t,
579 ) -> libc::c_int;
580 pub fn arf_rsqrt(z: arf_ptr, x: arf_srcptr, prec: slong, rnd: arf_rnd_t) -> libc::c_int;
581 pub fn arf_root(
582 z: arf_ptr,
583 x: arf_srcptr,
584 k: ulong,
585 prec: slong,
586 rnd: arf_rnd_t,
587 ) -> libc::c_int;
588 pub fn arf_get_mag(y: *mut mag_struct, x: *const arf_struct);
589 pub fn arf_get_mag_lower(y: *mut mag_struct, x: *const arf_struct);
590 #[link_name = "arf_set_mag__extern"]
591 pub fn arf_set_mag(y: *mut arf_struct, x: *const mag_struct);
592 #[link_name = "mag_init_set_arf__extern"]
593 pub fn mag_init_set_arf(y: *mut mag_struct, x: *const arf_struct);
594 #[link_name = "mag_fast_init_set_arf__extern"]
595 pub fn mag_fast_init_set_arf(y: *mut mag_struct, x: *const arf_struct);
596 #[link_name = "arf_mag_fast_add_ulp__extern"]
597 pub fn arf_mag_fast_add_ulp(
598 z: *mut mag_struct,
599 x: *const mag_struct,
600 y: *const arf_struct,
601 prec: slong,
602 );
603 #[link_name = "arf_mag_add_ulp__extern"]
604 pub fn arf_mag_add_ulp(
605 z: *mut mag_struct,
606 x: *const mag_struct,
607 y: *const arf_struct,
608 prec: slong,
609 );
610 #[link_name = "arf_mag_set_ulp__extern"]
611 pub fn arf_mag_set_ulp(z: *mut mag_struct, y: *const arf_struct, prec: slong);
612 pub fn arf_get_fmpq(y: *mut fmpq, x: *const arf_struct);
613 #[link_name = "arf_set_fmpq__extern"]
614 pub fn arf_set_fmpq(
615 y: *mut arf_struct,
616 x: *const fmpq,
617 prec: slong,
618 rnd: arf_rnd_t,
619 ) -> libc::c_int;
620 pub fn arf_complex_mul(
621 e: *mut arf_struct,
622 f: *mut arf_struct,
623 a: *const arf_struct,
624 b: *const arf_struct,
625 c: *const arf_struct,
626 d: *const arf_struct,
627 prec: slong,
628 rnd: arf_rnd_t,
629 ) -> libc::c_int;
630 pub fn arf_complex_mul_fallback(
631 e: *mut arf_struct,
632 f: *mut arf_struct,
633 a: *const arf_struct,
634 b: *const arf_struct,
635 c: *const arf_struct,
636 d: *const arf_struct,
637 prec: slong,
638 rnd: arf_rnd_t,
639 ) -> libc::c_int;
640 pub fn arf_complex_sqr(
641 e: *mut arf_struct,
642 f: *mut arf_struct,
643 a: *const arf_struct,
644 b: *const arf_struct,
645 prec: slong,
646 rnd: arf_rnd_t,
647 ) -> libc::c_int;
648 pub fn arf_sum(
649 s: *mut arf_struct,
650 terms: arf_srcptr,
651 len: slong,
652 prec: slong,
653 rnd: arf_rnd_t,
654 ) -> libc::c_int;
655 pub fn arf_get_d(x: *const arf_struct, rnd: arf_rnd_t) -> f64;
656 pub fn arf_set_d(x: *mut arf_struct, v: f64);
657 #[link_name = "arf_allocated_bytes__extern"]
658 pub fn arf_allocated_bytes(x: *const arf_struct) -> slong;
659 pub fn arf_load_str(res: *mut arf_struct, data: *const libc::c_char) -> libc::c_int;
660 pub fn arf_dump_str(x: *const arf_struct) -> *mut libc::c_char;
661 pub fn arf_load_file(res: *mut arf_struct, stream: *mut FILE) -> libc::c_int;
662 pub fn arf_dump_file(stream: *mut FILE, x: *const arf_struct) -> libc::c_int;
663 pub fn arf_dot(
664 res: *mut arf_struct,
665 initial: *const arf_struct,
666 subtract: libc::c_int,
667 x: arf_srcptr,
668 xstep: slong,
669 y: arf_srcptr,
670 ystep: slong,
671 len: slong,
672 prec: slong,
673 rnd: arf_rnd_t,
674 ) -> libc::c_int;
675 pub fn arf_approx_dot(
676 res: *mut arf_struct,
677 initial: *const arf_struct,
678 subtract: libc::c_int,
679 x: arf_srcptr,
680 xstep: slong,
681 y: arf_srcptr,
682 ystep: slong,
683 len: slong,
684 prec: slong,
685 rnd: arf_rnd_t,
686 );
687}