module type NUMERIC_BASE =sig
..end
type
t
val zero : t
val one : t
val neg : t -> t
Depending on the implementation, some of these operations
may raise exceptions at run-time to represent over/under-flows.
val succ : t -> t
val pred : t -> t
val abs : t -> t
val add : t ->
t -> t
val sub : t ->
t -> t
val mul : t ->
t -> t
val div : t ->
t -> t
val modulo : t ->
t -> t
val pow : t ->
t -> t
val compare : t -> t -> int
val of_int : int -> t
Convert this number to the closest integer.
val to_int : t -> int
t
.val of_string : string -> t
Invalid_argument
if the string does not represent
a valid number of type t
val to_string : t -> string
val of_float : float -> t
val to_float : t -> float