sig
type 'a tt
type m
type f
type t = Mpz.m Mpz.tt
val print : Format.formatter -> 'a Mpz.tt -> unit
external init : unit -> 'a Mpz.tt = "camlidl_mpz_mpz_init"
external init2 : int -> 'a Mpz.tt = "camlidl_mpz_mpz_init2"
external realloc2 : Mpz.t -> int -> unit = "camlidl_mpz_mpz_realloc2"
external set : Mpz.t -> 'a Mpz.tt -> unit = "camlidl_mpz_mpz_set"
external set_si : Mpz.t -> int -> unit = "camlidl_mpz_mpz_set_si"
external set_d : Mpz.t -> float -> unit = "camlidl_mpz_mpz_set_d"
external _set_str : Mpz.t -> string -> int -> unit
= "camlidl_mpz_mpz__set_str"
val set_str : Mpz.t -> string -> base:int -> unit
external swap : Mpz.t -> Mpz.t -> unit = "camlidl_mpz_mpz_swap"
external init_set : 'a Mpz.tt -> 'b Mpz.tt = "camlidl_mpz_mpz_init_set"
external init_set_si : int -> 'a Mpz.tt = "camlidl_mpz_mpz_init_set_si"
external init_set_d : float -> 'a Mpz.tt = "camlidl_mpz_mpz_init_set_d"
external _init_set_str : string -> int -> 'a Mpz.tt
= "camlidl_mpz_mpz__init_set_str"
val init_set_str : string -> base:int -> Mpz.t
external get_si : 'a Mpz.tt -> nativeint = "camlidl_mpz_mpz_get_si"
external get_int : 'a Mpz.tt -> int = "camlidl_mpz_mpz_get_int"
external get_d : 'a Mpz.tt -> float = "camlidl_mpz_mpz_get_d"
external get_d_2exp : 'a Mpz.tt -> float * int
= "camlidl_mpz_mpz_get_d_2exp"
external _get_str : int -> 'a Mpz.tt -> string = "camlidl_mpz_mpz__get_str"
val get_str : base:int -> 'a Mpz.tt -> string
val to_string : 'a Mpz.tt -> string
val to_float : 'a Mpz.tt -> float
val of_string : string -> 'a Mpz.tt
val of_float : float -> 'a Mpz.tt
val of_int : int -> 'a Mpz.tt
external add : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_add"
external add_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_add_ui"
external sub : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_sub"
external sub_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_sub_ui"
external ui_sub : Mpz.t -> int -> 'a Mpz.tt -> unit
= "camlidl_mpz_mpz_ui_sub"
external mul : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_mul"
external mul_si : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_mul_si"
external addmul : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_addmul"
external addmul_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_addmul_ui"
external submul : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_submul"
external submul_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_submul_ui"
external mul_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_mul_2exp"
external neg : Mpz.t -> 'a Mpz.tt -> unit = "camlidl_mpz_mpz_neg"
external abs : Mpz.t -> 'a Mpz.tt -> unit = "camlidl_mpz_mpz_abs"
external cdiv_q : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_cdiv_q"
external cdiv_r : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_cdiv_r"
external cdiv_qr : Mpz.t -> Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_cdiv_qr"
external cdiv_q_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_cdiv_q_ui"
external cdiv_r_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_cdiv_r_ui"
external cdiv_qr_ui : Mpz.t -> Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_cdiv_qr_ui"
external cdiv_ui : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_cdiv_ui"
external cdiv_q_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_cdiv_q_2exp"
external cdiv_r_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_cdiv_r_2exp"
external fdiv_q : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_fdiv_q"
external fdiv_r : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_fdiv_r"
external fdiv_qr : Mpz.t -> Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_fdiv_qr"
external fdiv_q_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_fdiv_q_ui"
external fdiv_r_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_fdiv_r_ui"
external fdiv_qr_ui : Mpz.t -> Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_fdiv_qr_ui"
external fdiv_ui : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_fdiv_ui"
external fdiv_q_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_fdiv_q_2exp"
external fdiv_r_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_fdiv_r_2exp"
external tdiv_q : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_tdiv_q"
external tdiv_r : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_tdiv_r"
external tdiv_qr : Mpz.t -> Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_tdiv_qr"
external tdiv_q_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_tdiv_q_ui"
external tdiv_r_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_tdiv_r_ui"
external tdiv_qr_ui : Mpz.t -> Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_tdiv_qr_ui"
external tdiv_ui : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_tdiv_ui"
external tdiv_q_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_tdiv_q_2exp"
external tdiv_r_2exp : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_tdiv_r_2exp"
external gmod : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_gmod"
external gmod_ui : Mpz.t -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_gmod_ui"
external divexact : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_divexact"
external divexact_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_divexact_ui"
external divisible_p : 'a Mpz.tt -> 'b Mpz.tt -> bool
= "camlidl_mpz_mpz_divisible_p"
external divisible_ui_p : 'a Mpz.tt -> int -> bool
= "camlidl_mpz_mpz_divisible_ui_p"
external divisible_2exp_p : 'a Mpz.tt -> int -> bool
= "camlidl_mpz_mpz_divisible_2exp_p"
external congruent_p : 'a Mpz.tt -> 'b Mpz.tt -> 'c Mpz.tt -> bool
= "camlidl_mpz_mpz_congruent_p"
external congruent_ui_p : 'a Mpz.tt -> int -> int -> bool
= "camlidl_mpz_mpz_congruent_ui_p"
external congruent_2exp_p : 'a Mpz.tt -> 'b Mpz.tt -> int -> bool
= "camlidl_mpz_mpz_congruent_2exp_p"
external _powm : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> 'c Mpz.tt -> unit
= "camlidl_mpz_mpz__powm"
external _powm_ui : Mpz.t -> 'a Mpz.tt -> int -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz__powm_ui"
val powm : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> modulo:'c Mpz.tt -> unit
val powm_ui : Mpz.t -> 'a Mpz.tt -> int -> modulo:'b Mpz.tt -> unit
external pow_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_pow_ui"
external ui_pow_ui : Mpz.t -> int -> int -> unit
= "camlidl_mpz_mpz_ui_pow_ui"
external root : Mpz.t -> 'a Mpz.tt -> int -> bool = "camlidl_mpz_mpz_root"
external sqrt : Mpz.t -> 'a Mpz.tt -> unit = "camlidl_mpz_mpz_sqrt"
external _sqrtrem : Mpz.t -> Mpz.t -> 'a Mpz.tt -> unit
= "camlidl_mpz_mpz__sqrtrem"
val sqrtrem : Mpz.t -> remainder:Mpz.t -> 'a Mpz.tt -> unit
external perfect_power_p : 'a Mpz.tt -> bool
= "camlidl_mpz_mpz_perfect_power_p"
external perfect_square_p : 'a Mpz.tt -> bool
= "camlidl_mpz_mpz_perfect_square_p"
external probab_prime_p : 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_probab_prime_p"
external nextprime : Mpz.t -> 'a Mpz.tt -> unit
= "camlidl_mpz_mpz_nextprime"
external gcd : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_gcd"
external gcd_ui : Mpz.t option -> 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_gcd_ui"
external _gcdext :
Mpz.t -> Mpz.t -> Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz__gcdext"
val gcdext :
gcd:Mpz.t -> alpha:Mpz.t -> beta:Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
external lcm : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_lcm"
external lcm_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_lcm_ui"
external invert : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> bool
= "camlidl_mpz_mpz_invert"
external jacobi : 'a Mpz.tt -> 'b Mpz.tt -> int = "camlidl_mpz_mpz_jacobi"
external legendre : 'a Mpz.tt -> 'b Mpz.tt -> int
= "camlidl_mpz_mpz_legendre"
external kronecker : 'a Mpz.tt -> 'b Mpz.tt -> int
= "camlidl_mpz_mpz_kronecker"
external kronecker_si : 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_kronecker_si"
external si_kronecker : int -> 'a Mpz.tt -> int
= "camlidl_mpz_mpz_si_kronecker"
external remove : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> int
= "camlidl_mpz_mpz_remove"
external fac_ui : Mpz.t -> int -> unit = "camlidl_mpz_mpz_fac_ui"
external bin_ui : Mpz.t -> 'a Mpz.tt -> int -> unit
= "camlidl_mpz_mpz_bin_ui"
external bin_uiui : Mpz.t -> int -> int -> unit
= "camlidl_mpz_mpz_bin_uiui"
external fib_ui : Mpz.t -> int -> unit = "camlidl_mpz_mpz_fib_ui"
external fib2_ui : Mpz.t -> Mpz.t -> int -> unit
= "camlidl_mpz_mpz_fib2_ui"
external lucnum_ui : Mpz.t -> int -> unit = "camlidl_mpz_mpz_lucnum_ui"
external lucnum2_ui : Mpz.t -> Mpz.t -> int -> unit
= "camlidl_mpz_mpz_lucnum2_ui"
external cmp : 'a Mpz.tt -> 'b Mpz.tt -> int = "camlidl_mpz_mpz_cmp"
external cmp_d : 'a Mpz.tt -> float -> int = "camlidl_mpz_mpz_cmp_d"
external cmp_si : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_cmp_si"
external cmpabs : 'a Mpz.tt -> 'b Mpz.tt -> int = "camlidl_mpz_mpz_cmpabs"
external cmpabs_d : 'a Mpz.tt -> float -> int = "camlidl_mpz_mpz_cmpabs_d"
external cmpabs_ui : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_cmpabs_ui"
external sgn : 'a Mpz.tt -> int = "camlidl_mpz_mpz_sgn"
external gand : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_gand"
external ior : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_ior"
external xor : Mpz.t -> 'a Mpz.tt -> 'b Mpz.tt -> unit
= "camlidl_mpz_mpz_xor"
external com : Mpz.t -> 'a Mpz.tt -> unit = "camlidl_mpz_mpz_com"
external popcount : 'a Mpz.tt -> int = "camlidl_mpz_mpz_popcount"
external hamdist : 'a Mpz.tt -> 'b Mpz.tt -> int
= "camlidl_mpz_mpz_hamdist"
external scan0 : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_scan0"
external scan1 : 'a Mpz.tt -> int -> int = "camlidl_mpz_mpz_scan1"
external setbit : Mpz.t -> int -> unit = "camlidl_mpz_mpz_setbit"
external clrbit : Mpz.t -> int -> unit = "camlidl_mpz_mpz_clrbit"
external tstbit : 'a Mpz.tt -> int -> bool = "camlidl_mpz_mpz_tstbit"
external _import :
Mpz.t ->
(int, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t ->
int -> int -> unit = "camlidl_mpz_mpz__import"
external _export :
'a Mpz.tt ->
int ->
int -> (int, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t
= "camlidl_mpz_mpz__export"
val import :
dest:Mpz.t ->
(int, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t ->
order:int -> endian:int -> unit
val export :
'a Mpz.tt ->
order:int ->
endian:int ->
(int, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t
external fits_int_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_fits_int_p"
external odd_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_odd_p"
external even_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_even_p"
external size : 'a Mpz.tt -> int = "camlidl_mpz_mpz_size"
external sizeinbase : 'a Mpz.tt -> int -> int
= "camlidl_mpz_mpz_sizeinbase"
external fits_ulong_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_fits_ulong_p"
external fits_slong_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_fits_slong_p"
external fits_uint_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_fits_uint_p"
external fits_sint_p : 'a Mpz.tt -> bool = "camlidl_mpz_mpz_fits_sint_p"
external fits_ushort_p : 'a Mpz.tt -> bool
= "camlidl_mpz_mpz_fits_ushort_p"
external fits_sshort_p : 'a Mpz.tt -> bool
= "camlidl_mpz_mpz_fits_sshort_p"
end