Module type Int.S_unbounded

type t
val of_float : float -> t
val to_float : t -> float
val of_int_exn : int -> t
val to_int_exn : t -> int
val hash_fold_t : Hash.state -> t -> Hash.state
val hash : t -> Hash.hash_value
val t_of_sexp : Sexp.t -> t
val sexp_of_t : t -> Sexp.t
val of_string : string -> t
val to_string : t -> string
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Or_error.t
type comparator_witness
val comparator : (tcomparator_witness) Comparator.comparator
val validate_lbound : min:t Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Validate.check
val validate_bound : min:t Maybe_bound.t -> max:t Maybe_bound.t -> t Validate.check
val pp : Formatter.t -> t -> unit
val validate_positive : t Validate.check
val validate_non_negative : t Validate.check
val validate_negative : t Validate.check
val validate_non_positive : t Validate.check
val is_positive : t -> bool
val is_non_negative : t -> bool
val is_negative : t -> bool
val is_non_positive : t -> bool
val sign : t -> Base__.Sign0.t
module Hex : sig ... end
val to_string_hum : ?⁠delimiter:char -> t -> string

delimiter is an underscore by default.

val zero : t
val one : t
val minus_one : t
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (**) : t -> t -> t

Integer exponentiation

val neg : t -> t
val (~-) : t -> t
val (/%) : t -> t -> t
val (%) : t -> t -> t
val (/) : t -> t -> t
val rem : t -> t -> t
val (//) : t -> t -> float

Float division of integers.

val (land) : t -> t -> t

Same as bit_and.

val (lor) : t -> t -> t

Same as bit_or.

val (lxor) : t -> t -> t

Same as bit_xor.

val (lnot) : t -> t

Same as bit_not.

val (lsl) : t -> int -> t

Same as shift_left.

val (asr) : t -> int -> t

Same as shift_right.

val round : ?⁠dir:[ `Down | `Nearest | `Up | `Zero ] -> t -> to_multiple_of:t -> t
val round_towards_zero : t -> to_multiple_of:t -> t
val round_down : t -> to_multiple_of:t -> t
val round_up : t -> to_multiple_of:t -> t
val round_nearest : t -> to_multiple_of:t -> t
val abs : t -> t

Returns the absolute value of the argument. May be negative if the input is min_value.

val succ : t -> t
val pred : t -> t
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. It is OK if base <= 0. pow raises if exponent < 0, or an integer overflow would occur.

val bit_and : t -> t -> t

These are identical to land, lor, etc. except they're not infix and have different names.

val bit_or : t -> t -> t
val bit_xor : t -> t -> t
val bit_not : t -> t
val popcount : t -> int

Returns the number of 1 bits in the binary representation of the input.

val shift_left : t -> int -> t

Shifts left, filling in with zeroes.

val shift_right : t -> int -> t

Shifts right, preserving the sign of the input.

val decr : t Caml.ref -> unit
val incr : t Caml.ref -> unit
val of_int32_exn : int32 -> t
val to_int32_exn : t -> int32
val of_int64_exn : int64 -> t
val to_int64 : t -> int64
val of_nativeint_exn : nativeint -> t
val to_nativeint_exn : t -> nativeint
val of_float_unchecked : float -> t

of_float_unchecked truncates the given floating point number to an integer, rounding towards zero. The result is unspecified if the argument is nan or falls outside the range of representable integers.

module O : sig ... end

A sub-module designed to be opened to make working with ints more convenient.