Module Usane.Uint16

module Uint16: sig .. end
Unsigned 16 bit integers, ranging from 0 to 2 ^ 16 - 1 (65535).

type t = int 
Type of an unsigned 16 bit integer. It is represented as an int
val pp : Format.formatter -> t -> unit
pp ppf u prints the unsigned 16bit integer in hex encoding.
val of_int : int -> t
of_int i is the integer i converted to an unsigned 16 bit integer.
Raises Invalid_argument if the integer is out of range.
val add : t -> t -> t * bool
add t t' is (r, carry), where r is t + t' mod (2 ^ 16 - 1). If the sum does not fit into 16 bits, carry is true, otherwise it is false.
val mul : t -> t -> t * bool
mul t t' is (r, carry), where r is t * t' mod (2 ^ 16 - 1). If the product does not fit into 16 bits, carry is true, otherwise it is false.
val sub : t -> t -> t * bool
sub t t' is (r, carry), where r is t - t' mod (2 ^ 16 - 1). If t is smaller than t', carry is true, otherwise it is false.
val succ : t -> t * bool
succ t is the successor of t: Usane.Uint16.add t 1l. If t is 2 ^ 16 - 1, carry is true, otherwise it is false.
val pred : t -> t * bool
pred t is the predecessor of t: Usane.Uint16.sub t 1l. If t is 0, carry is true, otherwise it is false.
val compare : t -> t -> int
compare t t' is
val (+) : t -> t -> t * bool
Convenience infix operator for Usane.Uint16.add.
val (-) : t -> t -> t * bool
Convenience infix operator for Usane.Uint16.sub.
val ( * ) : t -> t -> t * bool
Convenience infix operator for Usane.Uint16.mul.
val (<) : t -> t -> bool
Convenience infix operator for a < b using Usane.Uint16.compare.
val (<=) : t -> t -> bool
Convenience infix operator for a <= b using Usane.Uint16.compare.
val (>) : t -> t -> bool
Convenience infix operator for a > b using Usane.Uint16.compare.
val (>=) : t -> t -> bool
Convenience infix operator for a >= b using Usane.Uint16.compare.