`sig
type t = Gmp.Z2.t
external copy : Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_copy"
external from_int : int -> Gmp.Z.t = "_mlgmp_z_from_int"
external of_int : int -> Gmp.Z.t = "_mlgmp_z_from_int"
external from_string_base : base:int -> string -> Gmp.Z.t
= "_mlgmp_z_from_string_base"
external from_float : float -> Gmp.Z.t = "_mlgmp_z_from_float"
external of_float : float -> Gmp.Z.t = "_mlgmp_z_from_float"
external to_string_base : base:int -> Gmp.Z.t -> string
= "_mlgmp_z_to_string_base"
external to_int : Gmp.Z.t -> int = "_mlgmp_z_to_int"
external to_float : Gmp.Z.t -> float = "_mlgmp_z_to_float"
external int_from : Gmp.Z.t -> int = "_mlgmp_z_to_int"
external float_from : Gmp.Z.t -> float = "_mlgmp_z_to_float"
external add : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_add"
external sub : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_sub"
external mul : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_mul"
external add_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_add_ui"
external sub_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_sub_ui"
external mul_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_mul_ui"
external neg : Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_neg"
external abs : Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_abs"
external tdiv_qr : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_tdiv_qr"
external tdiv_q : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_tdiv_q"
external tdiv_r : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_tdiv_r"
external cdiv_qr : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_cdiv_qr"
external cdiv_q : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_cdiv_q"
external cdiv_r : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_cdiv_r"
external fdiv_qr : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_fdiv_qr"
external fdiv_q : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_fdiv_q"
external fdiv_r : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_fdiv_r"
external dmod : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_mod"
external dmod_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_mod_ui"
external euclidean_division : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_fdiv_qr"
external modulo : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_mod"
external tdiv_qr_ui : Gmp.Z.t -> int -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_tdiv_qr_ui"
external tdiv_q_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_tdiv_q_ui"
external tdiv_r_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_tdiv_r_ui"
external tdiv_ui : Gmp.Z.t -> int -> int = "_mlgmp_z_tdiv_ui"
external cdiv_qr_ui : Gmp.Z.t -> int -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_cdiv_qr_ui"
external cdiv_q_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_cdiv_q_ui"
external cdiv_r_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_cdiv_r_ui"
external cdiv_ui : Gmp.Z.t -> int -> int = "_mlgmp_z_cdiv_ui"
external fdiv_qr_ui : Gmp.Z.t -> int -> Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_fdiv_qr_ui"
external fdiv_q_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_fdiv_q_ui"
external fdiv_r_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_fdiv_r_ui"
external fdiv_ui : Gmp.Z.t -> int -> int = "_mlgmp_z_fdiv_ui"
external divexact : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_divexact"
external mul_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_mul_2exp"
external mul2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_mul_2exp"
external tdiv_q_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_tdiv_q_2exp"
external tdiv_r_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_tdiv_r_2exp"
external fdiv_q_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_fdiv_q_2exp"
external fdiv_r_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_fdiv_r_2exp"
external cdiv_q_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_cdiv_q_2exp"
external cdiv_r_2exp : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_cdiv_r_2exp"
external powm : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_powm"
external powm_ui : Gmp.Z.t -> int -> Gmp.Z.t -> Gmp.Z.t
= "_mlgmp_z_powm_ui"
external pow_ui : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_pow_ui"
external ui_pow_ui : int -> int -> Gmp.Z.t = "_mlgmp_z_ui_pow_ui"
external pow_ui_ui : int -> int -> Gmp.Z.t = "_mlgmp_z_ui_pow_ui"
external sqrt : Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_sqrt"
external sqrtrem : Gmp.Z.t -> Gmp.Z.t * Gmp.Z.t = "_mlgmp_z_sqrtrem"
external root : Gmp.Z.t -> int -> Gmp.Z.t = "_mlgmp_z_root"
external perfect_power_p : Gmp.Z.t -> bool = "_mlgmp_z_perfect_power_p"
external perfect_square_p : Gmp.Z.t -> bool = "_mlgmp_z_perfect_square_p"
external is_perfect_power : Gmp.Z.t -> bool = "_mlgmp_z_perfect_power_p"
external is_perfect_square : Gmp.Z.t -> bool = "_mlgmp_z_perfect_square_p"
external probab_prime_p : Gmp.Z.t -> int -> bool
= "_mlgmp_z_probab_prime_p"
external is_probab_prime : Gmp.Z.t -> int -> bool
= "_mlgmp_z_probab_prime_p"
external nextprime : Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_nextprime"
external gcd : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_gcd"
external gcd_ui : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_gcd_ui"
external lcm : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_lcm"
external gcdext : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t * Gmp.Z.t * Gmp.Z.t
= "_mlgmp_z_gcdext"
external inverse : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t option = "_mlgmp_z_invert"
external legendre : Gmp.Z.t -> Gmp.Z.t -> int = "_mlgmp_z_legendre"
external jacobi : Gmp.Z.t -> Gmp.Z.t -> int = "_mlgmp_z_jacobi"
external kronecker_si : Gmp.Z.t -> int -> int = "_mlgmp_z_kronecker_si"
external si_kronecker : int -> Gmp.Z.t -> int = "_mlgmp_z_si_kronecker"
external remove : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t * int = "_mlgmp_z_remove"
external fac_ui : int -> Gmp.Z.t = "_mlgmp_z_fac_ui"
external fib_ui : int -> Gmp.Z.t = "_mlgmp_z_fib_ui"
external bin_ui : n:Gmp.Z.t -> k:int -> Gmp.Z.t = "_mlgmp_z_bin_ui"
external bin_uiui : n:int -> k:int -> Gmp.Z.t = "_mlgmp_z_bin_uiui"
external cmp : Gmp.Z.t -> Gmp.Z.t -> int = "_mlgmp_z_compare"
external cmp_si : Gmp.Z.t -> int -> int = "_mlgmp_z_compare_si"
external compare : Gmp.Z.t -> Gmp.Z.t -> int = "_mlgmp_z_compare"
external compare_si : Gmp.Z.t -> int -> int = "_mlgmp_z_compare_si"
external compare_int : Gmp.Z.t -> int -> int = "_mlgmp_z_compare_si"
external sgn : Gmp.Z.t -> int = "_mlgmp_z_sgn"
external band : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_and"
external bior : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_ior"
external bxor : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_xor"
external bcom : Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_com"
external popcount : Gmp.Z.t -> int = "_mlgmp_z_popcount"
external hamdist : Gmp.Z.t -> Gmp.Z.t -> int = "_mlgmp_z_hamdist"
external scan0 : Gmp.Z.t -> int -> int = "_mlgmp_z_scan0"
external scan1 : Gmp.Z.t -> int -> int = "_mlgmp_z_scan1"
external urandomb : state:Gmp.RNG.randstate_t -> nbits:int -> Gmp.Z.t
= "_mlgmp_z_urandomb"
external urandomm : state:Gmp.RNG.randstate_t -> n:Gmp.Z.t -> Gmp.Z.t
= "_mlgmp_z_urandomm"
external rrandomb : state:Gmp.RNG.randstate_t -> nbits:int -> Gmp.Z.t
= "_mlgmp_z_rrandomb"
val zero : Gmp.Z.t
val one : Gmp.Z.t
val is_prime : ?prec:int -> Gmp.Z.t -> bool
val equal : Gmp.Z.t -> Gmp.Z.t -> bool
val equal_int : Gmp.Z.t -> int -> bool
val is_zero : Gmp.Z.t -> bool
val to_string : Gmp.Z.t -> string
val from_string : string -> Gmp.Z.t
val string_from : Gmp.Z.t -> string
val output : Stdlib.out_channel -> Gmp.Z.t -> unit
val sprintf : unit -> Gmp.Z.t -> string
val print : Stdlib.Format.formatter -> Gmp.Z.t -> unit
val succ : Gmp.Z.t -> Gmp.Z.t
val pred : Gmp.Z.t -> Gmp.Z.t
val min : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t
val max : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t
module Infixes :
sig
external ( +! ) : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_add"
external ( -! ) : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_sub"
external ( *! ) : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_mul"
external ( /! ) : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_fdiv_q"
external ( %! ) : Gmp.Z.t -> Gmp.Z.t -> Gmp.Z.t = "_mlgmp_z_fdiv_r"
val ( <! ) : Gmp.Z.t -> Gmp.Z.t -> bool
val ( <=! ) : Gmp.Z.t -> Gmp.Z.t -> bool
val ( =! ) : Gmp.Z.t -> Gmp.Z.t -> bool
val ( >=! ) : Gmp.Z.t -> Gmp.Z.t -> bool
val ( >! ) : Gmp.Z.t -> Gmp.Z.t -> bool
val ( <>! ) : Gmp.Z.t -> Gmp.Z.t -> bool
end
end`