arb_sys/
hypgeom.rs

1#![allow(non_camel_case_types)]
2#![allow(non_snake_case)]
3
4//! *See the [Arb documentation](https://arblib.org/).
5
6use crate::arb::arb_struct;
7use crate::mag::{mag_struct, mag_t};
8use flint_sys::deps::*;
9use flint_sys::fmpz_poly::fmpz_poly_t;
10
11#[repr(C)]
12#[derive(Debug, Copy, Clone)]
13pub struct hypgeom_struct {
14    pub A: fmpz_poly_t,
15    pub B: fmpz_poly_t,
16    pub P: fmpz_poly_t,
17    pub Q: fmpz_poly_t,
18    pub have_precomputed: ::std::os::raw::c_int,
19    pub r: mp_limb_signed_t,
20    pub boundC: mp_limb_signed_t,
21    pub boundD: mp_limb_signed_t,
22    pub boundK: mp_limb_signed_t,
23    pub MK: mag_t,
24}
25
26pub type hypgeom_t = [hypgeom_struct; 1usize];
27
28extern "C" {
29    pub fn hypgeom_init(hyp: *mut hypgeom_struct);
30    pub fn hypgeom_clear(hyp: *mut hypgeom_struct);
31    pub fn hypgeom_precompute(hyp: *mut hypgeom_struct);
32    pub fn hypgeom_estimate_terms(
33        z: *mut mag_struct,
34        r: ::std::os::raw::c_int,
35        prec: mp_limb_signed_t,
36    ) -> mp_limb_signed_t;
37    pub fn hypgeom_bound(
38        error: *mut mag_struct,
39        r: ::std::os::raw::c_int,
40        C: mp_limb_signed_t,
41        D: mp_limb_signed_t,
42        K: mp_limb_signed_t,
43        TK: *mut mag_struct,
44        z: *mut mag_struct,
45        prec: mp_limb_signed_t,
46    ) -> mp_limb_signed_t;
47    pub fn arb_hypgeom_sum(
48        P: *mut arb_struct,
49        Q: *mut arb_struct,
50        hyp: *mut hypgeom_struct,
51        n: mp_limb_signed_t,
52        prec: mp_limb_signed_t,
53    );
54    pub fn arb_hypgeom_infsum(
55        P: *mut arb_struct,
56        Q: *mut arb_struct,
57        hyp: *mut hypgeom_struct,
58        target_prec: mp_limb_signed_t,
59        prec: mp_limb_signed_t,
60    );
61}