Module Int
module Int: Core_int
include Int_intf.S
Conversion functions
val of_int : int -> t
val to_int : t -> int
val of_int32 : int32 -> t option
val to_int32 : t -> int32 option
val of_int64 : int64 -> t option
val of_int64_exn : int64 -> t
val of_nativeint : nativeint -> t option
val to_nativeint : t -> nativeint
val ceil_pow2 : int -> int
ceil_pow2 x
returns the smallest power of 2 that is greater than or equal to
x
. The implementation may only be called for x > 0
.
val floor_pow2 : int -> int
floor_pow2 x
returns the largest power of 2 that is less than or equal to x
. The
implementation may only be called for x > 0
.
val is_pow2 : int -> bool
is_pow2 x
returns true iff x
is a power of 2. is_pow2
raises if x <= 0
.
module Infix: sig
.. end