sig
  type t
  val zero : Gmp.FR.t
  external create_prec : prec:int -> unit -> Gmp.FR.t = "_mlgmp_fr_create"
  val create : unit -> Gmp.FR.t
  val default_prec : int Pervasives.ref
  external from_z_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.Z.t -> Gmp.FR.t
    = "_mlgmp_fr_from_z"
  external from_q_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.Z.t -> Gmp.FR.t
    = "_mlgmp_fr_from_z"
  external from_si_prec :
    prec:int -> mode:Gmp.rounding_mode -> int -> Gmp.FR.t
    = "_mlgmp_fr_from_si"
  external from_float_prec :
    prec:int -> mode:Gmp.rounding_mode -> float -> Gmp.FR.t
    = "_mlgmp_fr_from_float"
  external float_from : Gmp.FR.t -> float = "_mlgmp_fr_to_float"
  external to_float_mode : mode:Gmp.rounding_mode -> Gmp.FR.t -> float
    = "_mlgmp_fr_to_float"
  external from_string_prec_base :
    prec:int -> mode:Gmp.rounding_mode -> base:int -> string -> Gmp.FR.t
    = "_mlgmp_fr_from_string"
  external to_string_exp_base_digits :
    mode:Gmp.rounding_mode ->
    base:int -> digits:int -> Gmp.FR.t -> string * int
    = "_mlgmp_fr_to_string_exp_base_digits"
  external add_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_add"
  external sub_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_sub"
  external mul_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_mul"
  external div_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_div"
  external add_prec_ui :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> int -> Gmp.FR.t
    = "_mlgmp_fr_add_ui"
  external sub_prec_ui :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> int -> Gmp.FR.t
    = "_mlgmp_fr_sub_ui"
  external mul_prec_ui :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> int -> Gmp.FR.t
    = "_mlgmp_fr_mul_ui"
  external div_prec_ui :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> int -> Gmp.FR.t
    = "_mlgmp_fr_div_ui"
  external neg_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_neg"
  external abs_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_abs"
  external inv_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_div"
  external reldiff_prec :
    prec:int -> mode:Gmp.rounding_mode -> Gmp.FR.t -> Gmp.FR.t
    = "_mlgmp_fr_reldiff"
  external ceil_prec : prec:int -> Gmp.FR.t -> Gmp.FR.t = "_mlgmp_fr_ceil"
  external floor_prec : prec:int -> Gmp.FR.t -> Gmp.FR.t = "_mlgmp_fr_floor"
  external trunc_prec : prec:int -> Gmp.FR.t -> Gmp.FR.t = "_mlgmp_fr_trunc"
  external cmp : Gmp.FR.t -> Gmp.FR.t -> int = "_mlgmp_fr_cmp"
  external compare : Gmp.FR.t -> Gmp.FR.t -> int = "_mlgmp_fr_cmp"
  external sgn : Gmp.FR.t -> int = "_mlgmp_fr_sgn"
  external eq : Gmp.FR.t -> Gmp.FR.t -> prec:int -> bool = "_mlgmp_fr_eq"
  external is_nan : Gmp.FR.t -> bool = "_mlgmp_fr_is_nan"
  external urandomb : prec:int -> state:Gmp.RNG.randstate_t -> Gmp.FR.t
    = "_mlgmp_fr_urandomb"
  external random : prec:int -> Gmp.FR.t = "_mlgmp_fr_random"
  external random2 : prec:int -> nlimbs:int -> max_exp:int -> Gmp.FR.t
    = "_mlgmp_fr_random2"
  val from_z : Gmp.Z.t -> Gmp.FR.t
  val from_q : Gmp.Z.t -> Gmp.FR.t
  val from_si : int -> Gmp.FR.t
  val from_int : int -> Gmp.FR.t
  val from_float : float -> Gmp.FR.t
  val to_float : Gmp.FR.t -> float
  val from_string_base : base:int -> string -> Gmp.FR.t
  val from_string : string -> Gmp.FR.t
  val add : Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
  val sub : Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
  val mul : Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
  val div : Gmp.FR.t -> Gmp.FR.t -> Gmp.FR.t
  val reldiff : Gmp.FR.t -> Gmp.FR.t
  val add_ui : Gmp.FR.t -> int -> Gmp.FR.t
  val sub_ui : Gmp.FR.t -> int -> Gmp.FR.t
  val mul_ui : Gmp.FR.t -> int -> Gmp.FR.t
  val div_ui : Gmp.FR.t -> int -> Gmp.FR.t
  val neg : Gmp.FR.t -> Gmp.FR.t
  val abs : Gmp.FR.t -> Gmp.FR.t
  val inv : Gmp.FR.t -> Gmp.FR.t
  val floor : Gmp.FR.t -> Gmp.FR.t
  val ceil : Gmp.FR.t -> Gmp.FR.t
  val trunc : Gmp.FR.t -> Gmp.FR.t
  val equal : Gmp.FR.t -> Gmp.FR.t -> bool
  val to_string_base_digits :
    mode:Gmp.rounding_mode -> base:int -> digits:int -> Gmp.FR.t -> string
  val to_string : Gmp.FR.t -> string
  external to_z_exp : Gmp.FR.t -> Gmp.Z.t * int = "_mlgmp_fr_to_z_exp"
  val to_z_t : Gmp.FR.t -> Gmp.Z.t
  val to_z_c : Gmp.FR.t -> Gmp.Z.t
  val to_z_f : Gmp.FR.t -> Gmp.Z.t
  val to_z : Gmp.FR.t -> Gmp.Z.t
  val z_from : Gmp.FR.t -> Gmp.Z.t
  external is_available : unit -> bool = "_mlgmp_is_mpfr_available"
end