sig
type 'a tt
type m
type f
type t = Mpq.m Mpq.tt
external canonicalize : 'a Mpq.tt -> unit = "camlidl_mpq_mpq_canonicalize"
val print : Format.formatter -> 'a Mpq.tt -> unit
external init : unit -> 'a Mpq.tt = "camlidl_mpq_mpq_init"
external set : Mpq.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_set"
external set_z : Mpq.t -> 'a Mpz.tt -> unit = "camlidl_mpq_mpq_set_z"
external set_si : Mpq.t -> int -> int -> unit = "camlidl_mpq_mpq_set_si"
external _set_str : Mpq.t -> string -> int -> unit
= "camlidl_mpq_mpq__set_str"
val set_str : Mpq.t -> string -> base:int -> unit
external swap : Mpq.t -> Mpq.t -> unit = "camlidl_mpq_mpq_swap"
val init_set : 'a Mpq.tt -> 'b Mpq.tt
val init_set_z : 'a Mpz.tt -> 'b Mpq.tt
val init_set_si : int -> int -> 'a Mpq.tt
val init_set_str : string -> base:int -> 'a Mpq.tt
val init_set_d : float -> 'a Mpq.tt
external get_d : 'a Mpq.tt -> float = "camlidl_mpq_mpq_get_d"
external set_d : Mpq.t -> float -> unit = "camlidl_mpq_mpq_set_d"
external get_z : Mpz.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_get_z"
external _get_str : int -> 'a Mpq.tt -> string = "camlidl_mpq_mpq__get_str"
val get_str : base:int -> Mpq.t -> string
val to_string : 'a Mpq.tt -> string
val to_float : 'a Mpq.tt -> float
val of_string : string -> 'a Mpq.tt
val of_float : float -> 'a Mpq.tt
val of_int : int -> 'a Mpq.tt
val of_frac : int -> int -> 'a Mpq.tt
val of_mpz : 'a Mpz.tt -> 'b Mpq.tt
val of_mpz2 : 'a Mpz.tt -> 'b Mpz.tt -> 'c Mpq.tt
external add : Mpq.t -> 'a Mpq.tt -> 'b Mpq.tt -> unit
= "camlidl_mpq_mpq_add"
external sub : Mpq.t -> 'a Mpq.tt -> 'b Mpq.tt -> unit
= "camlidl_mpq_mpq_sub"
external mul : Mpq.t -> 'a Mpq.tt -> 'b Mpq.tt -> unit
= "camlidl_mpq_mpq_mul"
external mul_2exp : Mpq.t -> 'a Mpq.tt -> int -> unit
= "camlidl_mpq_mpq_mul_2exp"
external div : Mpq.t -> 'a Mpq.tt -> 'b Mpq.tt -> unit
= "camlidl_mpq_mpq_div"
external div_2exp : Mpq.t -> 'a Mpq.tt -> int -> unit
= "camlidl_mpq_mpq_div_2exp"
external neg : Mpq.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_neg"
external abs : Mpq.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_abs"
external inv : Mpq.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_inv"
external cmp : 'a Mpq.tt -> 'b Mpq.tt -> int = "camlidl_mpq_mpq_cmp"
external cmp_si : 'a Mpq.tt -> int -> int -> int = "camlidl_mpq_mpq_cmp_si"
external sgn : 'a Mpq.tt -> int = "camlidl_mpq_mpq_sgn"
external equal : 'a Mpq.tt -> 'b Mpq.tt -> bool = "camlidl_mpq_mpq_equal"
external get_num : Mpz.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_get_num"
external get_den : Mpz.t -> 'a Mpq.tt -> unit = "camlidl_mpq_mpq_get_den"
external set_num : Mpq.t -> 'a Mpz.tt -> unit = "camlidl_mpq_mpq_set_num"
external set_den : Mpq.t -> 'a Mpz.tt -> unit = "camlidl_mpq_mpq_set_den"
end