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