flint-sys 0.9.0

Bindings to the FLINT C library
Documentation
/* automatically generated by rust-bindgen 0.70.1 */

use libc::*;
use crate::deps::*;
use crate::arb_types::*;
use crate::flint::*;


pub const MAG_BITS: u32 = 30;
extern "C" {
    #[link_name = "_fmpz_set_fast__extern"]
    pub fn _fmpz_set_fast(f: *mut fmpz, g: *const fmpz);
    #[link_name = "_fmpz_add_fast__extern"]
    pub fn _fmpz_add_fast(z: *mut fmpz, x: *const fmpz, c: slong);
    #[link_name = "_fmpz_add2_fast__extern"]
    pub fn _fmpz_add2_fast(z: *mut fmpz, x: *const fmpz, y: *const fmpz, c: slong);
    #[link_name = "_fmpz_sub2_fast__extern"]
    pub fn _fmpz_sub2_fast(z: *mut fmpz, x: *const fmpz, y: *const fmpz, c: slong);
    #[link_name = "mag_init__extern"]
    pub fn mag_init(x: *mut mag_struct);
    #[link_name = "mag_init_set__extern"]
    pub fn mag_init_set(x: *mut mag_struct, y: *const mag_struct);
    pub fn mag_clear(x: *mut mag_struct);
    #[link_name = "mag_swap__extern"]
    pub fn mag_swap(x: *mut mag_struct, y: *mut mag_struct);
    #[link_name = "mag_set__extern"]
    pub fn mag_set(x: *mut mag_struct, y: *const mag_struct);
    #[link_name = "mag_zero__extern"]
    pub fn mag_zero(x: *mut mag_struct);
    #[link_name = "mag_one__extern"]
    pub fn mag_one(x: *mut mag_struct);
    #[link_name = "mag_is_special__extern"]
    pub fn mag_is_special(x: *const mag_struct) -> libc::c_int;
    #[link_name = "mag_is_zero__extern"]
    pub fn mag_is_zero(x: *const mag_struct) -> libc::c_int;
    #[link_name = "mag_inf__extern"]
    pub fn mag_inf(x: *mut mag_struct);
    #[link_name = "mag_is_inf__extern"]
    pub fn mag_is_inf(x: *const mag_struct) -> libc::c_int;
    #[link_name = "mag_is_finite__extern"]
    pub fn mag_is_finite(x: *const mag_struct) -> libc::c_int;
    #[link_name = "mag_equal__extern"]
    pub fn mag_equal(x: *const mag_struct, y: *const mag_struct) -> libc::c_int;
    pub fn mag_mul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_mul_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_addmul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_add_2exp_fmpz(z: *mut mag_struct, x: *const mag_struct, e: *const fmpz);
    pub fn mag_add(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_add_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_add_ui(z: *mut mag_struct, x: *const mag_struct, y: ulong);
    pub fn mag_add_ui_lower(res: *mut mag_struct, x: *const mag_struct, y: ulong);
    pub fn mag_add_ui_2exp_si(z: *mut mag_struct, x: *const mag_struct, y: ulong, e: slong);
    pub fn mag_div(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_div_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    #[link_name = "mag_inv__extern"]
    pub fn mag_inv(res: *mut mag_struct, x: *const mag_struct);
    #[link_name = "mag_inv_lower__extern"]
    pub fn mag_inv_lower(res: *mut mag_struct, x: *const mag_struct);
    pub fn mag_mul_2exp_si(z: *mut mag_struct, x: *const mag_struct, y: slong);
    pub fn mag_mul_2exp_fmpz(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
    pub fn mag_sub(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_sub_lower(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    #[link_name = "mag_fast_init_set__extern"]
    pub fn mag_fast_init_set(x: *mut mag_struct, y: *const mag_struct);
    #[link_name = "mag_fast_zero__extern"]
    pub fn mag_fast_zero(x: *mut mag_struct);
    #[link_name = "mag_fast_is_zero__extern"]
    pub fn mag_fast_is_zero(x: *const mag_struct) -> libc::c_int;
    #[link_name = "mag_fast_mul__extern"]
    pub fn mag_fast_mul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    #[link_name = "mag_fast_mul_2exp_si__extern"]
    pub fn mag_fast_mul_2exp_si(z: *mut mag_struct, x: *const mag_struct, y: slong);
    #[link_name = "mag_fast_addmul__extern"]
    pub fn mag_fast_addmul(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    #[link_name = "mag_fast_add_2exp_si__extern"]
    pub fn mag_fast_add_2exp_si(z: *mut mag_struct, x: *const mag_struct, e: slong);
    pub fn mag_set_d(z: *mut mag_struct, x: f64);
    pub fn mag_set_d_lower(z: *mut mag_struct, x: f64);
    pub fn mag_set_d_2exp_fmpz(z: *mut mag_struct, c: f64, exp: *const fmpz);
    pub fn mag_set_d_2exp_fmpz_lower(z: *mut mag_struct, c: f64, exp: *const fmpz);
    pub fn mag_set_fmpz_2exp_fmpz(z: *mut mag_struct, man: *const fmpz, exp: *const fmpz);
    pub fn mag_randtest_special(x: *mut mag_struct, state: *mut flint_rand_struct, expbits: slong);
    pub fn mag_randtest(x: *mut mag_struct, state: *mut flint_rand_struct, expbits: slong);
    pub fn mag_fprint(file: *mut FILE, x: *const mag_struct);
    pub fn mag_fprintd(file: *mut FILE, x: *const mag_struct, d: slong);
    pub fn mag_print(x: *const mag_struct);
    pub fn mag_printd(x: *const mag_struct, d: slong);
    pub fn mag_get_fmpq(y: *mut fmpq, x: *const mag_struct);
    pub fn mag_get_fmpz(res: *mut fmpz, x: *const mag_struct);
    pub fn mag_get_fmpz_lower(res: *mut fmpz, x: *const mag_struct);
    pub fn mag_cmp(x: *const mag_struct, y: *const mag_struct) -> libc::c_int;
    pub fn mag_cmp_2exp_si(x: *const mag_struct, e: slong) -> libc::c_int;
    #[link_name = "mag_min__extern"]
    pub fn mag_min(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    #[link_name = "mag_max__extern"]
    pub fn mag_max(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    #[link_name = "_mag_vec_init__extern"]
    pub fn _mag_vec_init(n: slong) -> mag_ptr;
    #[link_name = "_mag_vec_clear__extern"]
    pub fn _mag_vec_clear(v: mag_ptr, n: slong);
    pub fn mag_get_d(z: *const mag_struct) -> f64;
    pub fn mag_get_d_log2_approx(x: *const mag_struct) -> f64;
    pub fn mag_d_log_upper_bound(x: f64) -> f64;
    pub fn mag_d_log_lower_bound(x: f64) -> f64;
    pub fn mag_log1p(z: *mut mag_struct, x: *const mag_struct);
    pub fn mag_log_ui(t: *mut mag_struct, n: ulong);
    pub fn mag_log(z: *mut mag_struct, x: *const mag_struct);
    pub fn mag_log_lower(z: *mut mag_struct, x: *const mag_struct);
    pub fn mag_neg_log(z: *mut mag_struct, x: *const mag_struct);
    pub fn mag_neg_log_lower(z: *mut mag_struct, x: *const mag_struct);
    pub fn mag_exp(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_exp_lower(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_expinv(res: *mut mag_struct, x: *const mag_struct);
    pub fn mag_expinv_lower(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_expm1(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_exp_tail(z: *mut mag_struct, x: *const mag_struct, N: ulong);
    pub fn mag_sinh(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_sinh_lower(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_cosh(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_cosh_lower(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_pow_ui(z: *mut mag_struct, x: *const mag_struct, e: ulong);
    pub fn mag_pow_ui_lower(z: *mut mag_struct, x: *const mag_struct, e: ulong);
    pub fn mag_pow_fmpz(z: *mut mag_struct, x: *const mag_struct, e: *const fmpz);
    pub fn mag_pow_fmpz_lower(z: *mut mag_struct, x: *const mag_struct, e: *const fmpz);
    pub fn mag_const_pi(res: *mut mag_struct);
    pub fn mag_const_pi_lower(res: *mut mag_struct);
    pub fn mag_atan(res: *mut mag_struct, x: *const mag_struct);
    pub fn mag_atan_lower(res: *mut mag_struct, x: *const mag_struct);
    pub fn mag_fac_ui(z: *mut mag_struct, n: ulong);
    pub fn mag_rfac_ui(z: *mut mag_struct, n: ulong);
    pub fn mag_bin_uiui(res: *mut mag_struct, n: ulong, k: ulong);
    pub fn mag_bernoulli_div_fac_ui(z: *mut mag_struct, n: ulong);
    pub fn mag_set_fmpz_2exp_fmpz_lower(z: *mut mag_struct, man: *const fmpz, exp: *const fmpz);
    pub fn mag_sqrt(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_sqrt_lower(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_rsqrt(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_rsqrt_lower(y: *mut mag_struct, x: *const mag_struct);
    pub fn mag_root(y: *mut mag_struct, x: *const mag_struct, n: ulong);
    pub fn mag_hypot(z: *mut mag_struct, x: *const mag_struct, y: *const mag_struct);
    pub fn mag_binpow_uiui(b: *mut mag_struct, m: ulong, n: ulong);
    pub fn mag_polylog_tail(
        u: *mut mag_struct,
        z: *const mag_struct,
        sigma: slong,
        d: ulong,
        N: ulong,
    );
    pub fn mag_geom_series(res: *mut mag_struct, x: *const mag_struct, n: ulong);
    pub fn mag_hurwitz_zeta_uiui(res: *mut mag_struct, s: ulong, a: ulong);
    pub fn mag_set_ui(z: *mut mag_struct, x: ulong);
    pub fn mag_set_ui_lower(z: *mut mag_struct, x: ulong);
    pub fn mag_set_ui_2exp_si(z: *mut mag_struct, v: ulong, e: slong);
    #[link_name = "mag_set_fmpz__extern"]
    pub fn mag_set_fmpz(z: *mut mag_struct, x: *const fmpz);
    #[link_name = "mag_set_fmpz_lower__extern"]
    pub fn mag_set_fmpz_lower(z: *mut mag_struct, x: *const fmpz);
    #[link_name = "mag_mul_ui__extern"]
    pub fn mag_mul_ui(z: *mut mag_struct, x: *const mag_struct, y: ulong);
    #[link_name = "mag_mul_ui_lower__extern"]
    pub fn mag_mul_ui_lower(z: *mut mag_struct, x: *const mag_struct, y: ulong);
    #[link_name = "mag_mul_fmpz__extern"]
    pub fn mag_mul_fmpz(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
    #[link_name = "mag_mul_fmpz_lower__extern"]
    pub fn mag_mul_fmpz_lower(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
    #[link_name = "mag_div_ui__extern"]
    pub fn mag_div_ui(z: *mut mag_struct, x: *const mag_struct, y: ulong);
    #[link_name = "mag_div_fmpz__extern"]
    pub fn mag_div_fmpz(z: *mut mag_struct, x: *const mag_struct, y: *const fmpz);
    #[link_name = "mag_allocated_bytes__extern"]
    pub fn mag_allocated_bytes(x: *const mag_struct) -> slong;
    pub fn mag_load_str(res: *mut mag_struct, data: *const libc::c_char) -> libc::c_int;
    pub fn mag_dump_str(x: *const mag_struct) -> *mut libc::c_char;
    pub fn mag_load_file(res: *mut mag_struct, stream: *mut FILE) -> libc::c_int;
    pub fn mag_dump_file(stream: *mut FILE, x: *const mag_struct) -> libc::c_int;
}