module Mpzf:GMP multi-precision integers, functional versionsig..end
Mpz. These functions are less efficients, due to
the additional memory allocation neded for the result.
This module could be extended to offer more functions with a functional
semantics.
type t
val to_mpz : t -> Mpz.tval of_mpz : Mpz.t -> t
There is no sharing between the argument and the result.
val mpz : t -> Mpz.tval mpzf : Mpz.t -> t
The argument and the result actually share the same number: be cautious !
val print : Format.formatter -> t -> unitval of_string : string -> tval of_float : float -> tval of_int : int -> tval to_string : t -> stringval to_float : t -> floatval add : t -> t -> tval add_int : t -> int -> tval sub : t -> t -> tval sub_int : t -> int -> tval mul : t -> t -> tval mul_int : t -> int -> tval cdiv_q : t -> t -> tval cdiv_r : t -> t -> tval cdiv_qr : t -> t -> t * tval fdiv_q : t -> t -> tval fdiv_r : t -> t -> tval fdiv_qr : t -> t -> t * tval tdiv_q : t -> t -> tval tdiv_r : t -> t -> tval tdiv_qr : t -> t -> t * tval divexact : t -> t -> tval gmod : t -> t -> tval gcd : t -> t -> tval lcm : t -> t -> tval neg : t -> tval abs : t -> tval cmp : t -> t -> intval cmp_int : t -> int -> intval sgn : t -> int