Numbers.Z
Integers implementation. *
val zero : t
val one : t
val m_one : t
val compare_to_0 : t -> int
val sign : t -> int
val hash : t -> int
val is_zero : t -> bool
val is_one : t -> bool
val is_m_one : t -> bool
val from_int : int -> t
val from_string : string -> t
val to_string : t -> string
val pp_print : t Fmt.t
val to_machine_int : t -> int option
convert to machine integer. returns None in case of overflow
val to_float : t -> float
val print : Stdlib.Format.formatter -> t -> unit
returns sqrt truncated with the remainder. It assumes that the argument is positive, otherwise, Invalid_argument
is raised.
val testbit : t -> int -> bool
testbit z n
returns true iff the nth bit of z is set to 1. n is supposed to be positive
val numbits : t -> int
return the number of bits set to one in the given integer