module Mpfr:MPFR multiprecision floating-point numberssig..end
type t
type round =
| |
Near |
| |
Zero |
| |
Up |
| |
Down |
set, add, ...) the first parameter of type t is an out-parameter and holds the result when the function returns. For instance, add x y z adds the values of y and z and stores the result in x.
These functions are as efficient as their C counterpart: they do not imply additional memory allocation.
val print : Format.formatter -> t -> unitval print_round : Format.formatter -> round -> unitval string_of_round : round -> stringval set_default_rounding_mode : round -> unitval get_default_rounding_mode : unit -> roundval round_prec : t -> round -> int -> intval get_emin : unit -> intval get_emax : unit -> intval set_emin : int -> unitval set_emax : int -> unitval check_range : t -> int -> round -> intval clear_underflow : unit -> unitval clear_overflow : unit -> unitval clear_nanflag : unit -> unitval clear_inexflag : unit -> unitval clear_flags : unit -> unitval underflow_p : unit -> boolval overflow_p : unit -> boolval nanflag_p : unit -> boolval inexflag_p : unit -> boolval set_default_prec : int -> unitval get_default_prec : unit -> intval init : unit -> tval init2 : int -> tval get_prec : t -> intval set_prec : t -> int -> unitval set_prec_raw : t -> int -> unitval set : t -> t -> round -> intval set_si : t -> int -> round -> intval set_d : t -> float -> round -> intval set_z : t -> Mpz.t -> round -> intval set_q : t -> Mpq.t -> round -> intval _set_str : t -> string -> int -> round -> unitval set_str : t -> string -> base:int -> round -> unitval set_f : t -> Mpf.t -> round -> intval set_si_2exp : t -> int -> int -> round -> intval set_inf : t -> int -> unitval set_nan : t -> unitval swap : t -> t -> unitval init_set : t -> round -> int * tval init_set_si : int -> round -> int * tval init_set_d : float -> round -> int * tval init_set_f : Mpf.t -> round -> int * tval init_set_z : Mpz.t -> round -> int * tval init_set_q : Mpq.t -> round -> int * tval _init_set_str : string -> int -> round -> tval init_set_str : string -> base:int -> round -> tval get_d : t -> round -> floatval get_d1 : t -> floatval get_z_exp : Mpz.t -> t -> intval get_z : Mpz.t -> t -> round -> unitval _get_str : int -> int -> t -> round -> string * intval get_str : base:int -> digits:int -> t -> round -> string * intval to_string : t -> stringval to_float : ?round:round -> t -> floatval to_mpq : t -> Mpq.tval of_string : string -> round -> tval of_float : float -> round -> tval of_int : int -> round -> tval of_frac : int -> int -> round -> tval of_mpz : Mpz.t -> round -> tval of_mpz2 : Mpz.t -> Mpz.t -> round -> tval of_mpq : Mpq.t -> round -> tval add : t -> t -> t -> round -> intval add_ui : t -> t -> int -> round -> intval add_z : t -> t -> Mpz.t -> round -> intval add_q : t -> t -> Mpq.t -> round -> intval sub : t -> t -> t -> round -> intval ui_sub : t -> int -> t -> round -> intval sub_ui : t -> t -> int -> round -> intval sub_z : t -> t -> Mpz.t -> round -> intval sub_q : t -> t -> Mpq.t -> round -> intval mul : t -> t -> t -> round -> intval mul_ui : t -> t -> int -> round -> intval mul_z : t -> t -> Mpz.t -> round -> intval mul_q : t -> t -> Mpq.t -> round -> intval mul_2ui : t -> t -> int -> round -> intval mul_2si : t -> t -> int -> round -> intval mul_2exp : t -> t -> int -> round -> intval div : t -> t -> t -> round -> intval ui_div : t -> int -> t -> round -> intval div_ui : t -> t -> int -> round -> intval div_z : t -> t -> Mpz.t -> round -> intval div_q : t -> t -> Mpq.t -> round -> intval div_2ui : t -> t -> int -> round -> intval div_2si : t -> t -> int -> round -> intval div_2exp : t -> t -> int -> round -> intval sqrt : t -> t -> round -> boolval sqrt_ui : t -> int -> round -> boolval pow_ui : t -> t -> int -> round -> boolval pow_si : t -> t -> int -> round -> boolval ui_pow_ui : t -> int -> int -> round -> boolval ui_pow : t -> int -> t -> round -> boolval pow : t -> t -> t -> round -> boolval neg : t -> t -> round -> intval abs : t -> t -> round -> intval cmp : t -> t -> intval cmp_si : t -> int -> intval cmp_si_2exp : t -> int -> int -> intval sgn : t -> intval _equal : t -> t -> int -> boolval equal : t -> t -> bits:int -> boolval nan_p : t -> boolval inf_p : t -> boolval number_p : t -> boolval reldiff : t -> t -> t -> round -> unitval log : t -> t -> round -> intval log2 : t -> t -> round -> intval log10 : t -> t -> round -> intval exp : t -> t -> round -> intval exp2 : t -> t -> round -> intval exp10 : t -> t -> round -> intval cos : t -> t -> round -> intval sin : t -> t -> round -> intval tan : t -> t -> round -> intval sec : t -> t -> round -> intval csc : t -> t -> round -> intval cot : t -> t -> round -> intval sin_cos : t -> t -> t -> round -> boolval acos : t -> t -> round -> intval asin : t -> t -> round -> intval atan : t -> t -> round -> intval atan2 : t -> t -> t -> round -> intval cosh : t -> t -> round -> intval sinh : t -> t -> round -> intval tanh : t -> t -> round -> intval sech : t -> t -> round -> intval csch : t -> t -> round -> intval coth : t -> t -> round -> intval acosh : t -> t -> round -> intval asinh : t -> t -> round -> intval atanh : t -> t -> round -> intval fac_ui : t -> int -> round -> intval log1p : t -> t -> round -> intval expm1 : t -> t -> round -> intval eint : t -> t -> round -> intval gamma : t -> t -> round -> intval lngamma : t -> t -> round -> intval zeta : t -> t -> round -> intval erf : t -> t -> round -> intval erfc : t -> t -> round -> intval fma : t -> t -> t -> t -> round -> intval agm : t -> t -> t -> round -> intval hypot : t -> t -> t -> round -> intval const_log2 : t -> round -> intval const_pi : t -> round -> intval const_euler : t -> round -> intval const_catalan : t -> round -> intval rint : t -> t -> round -> intval ceil : t -> t -> intval floor : t -> t -> intval round : t -> t -> intval trunc : t -> t -> intval integer_p : t -> boolval nexttoward : t -> t -> unitval nextabove : t -> unitval nextbelow : t -> unitval min : t -> t -> t -> round -> intval max : t -> t -> t -> round -> intval get_exp : t -> intval set_exp : t -> int -> int