signature MLTON_INT_INF = sig type t val areSmall: t * t -> bool val gcd: t * t -> t val isSmall: t -> bool datatype rep = Big of word vector | Small of int val rep: t -> rep end
MLton represents an arbitrary precision integer either as an unboxed 32 bit word with the bottom bit set to 1 and the top 31 bits representing a small integer in [-230, 230), or as a pointer to a vector of words where the first word indicates the sign and the rest are the limbs of GnuMP big integer.
-
type t
-
areSmall (a, b)
-
gcd (a, b)
-
isSmall a
-
datatype rep
-
rep i
-
the same as type IntInf.int.
-
returns true iff both a and b are small.
-
uses the GnuMP's fast gcd implementation.
-
returns true iff a is small.
-
the underlying representation of an IntInf.int.
-
returns the underlying representation of i.