package integers

  1. Overview
  2. Docs

Module Unsigned.UInt64Source

Unsigned 64-bit integer type and operations.

include S
Sourcetype t
Sourceval add : t -> t -> t

Addition.

Sourceval sub : t -> t -> t

Subtraction.

Sourceval mul : t -> t -> t

Multiplication.

Sourceval div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

Sourceval rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

Sourceval max_int : t

The greatest representable integer.

Sourceval logand : t -> t -> t

Bitwise logical and.

Sourceval logor : t -> t -> t

Bitwise logical or.

Sourceval logxor : t -> t -> t

Bitwise logical exclusive or.

Sourceval shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

Sourceval shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

Sourceval of_int : int -> t

Convert the given int value to an unsigned integer.

Sourceval to_int : t -> int

Convert the given unsigned integer value to an int.

Sourceval of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure "int_of_string" if the given string is not a valid representation of an unsigned integer.

Sourceval to_string : t -> string

Return the string representation of its argument.

Sourceval zero : t

The integer 0.

Sourceval one : t

The integer 1.

Sourceval lognot : t -> t

Bitwise logical negation.

Sourceval succ : t -> t

Successor.

Sourceval pred : t -> t

Predecessor.

Sourceval compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Pervasives.compare.

Sourceval equal : t -> t -> bool

Tests for equality, with the same specification as Pervasives.(=).

Sourceval max : t -> t -> t

max x y is the greater of x and y

Sourceval min : t -> t -> t

min x y is the lesser of x and y

Sourceval pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

Sourcemodule Infix : Infix with type t := t
Sourceval of_int64 : int64 -> t
Sourceval to_int64 : t -> int64
Sourceval of_uint32 : UInt32.t -> t

Convert the given 32-bit unsigned integer to a 64-bit unsigned integer.

Sourceval to_uint32 : t -> UInt32.t

Convert the given 64-bit unsigned integer to a 32-bit unsigned integer. The 64-bit unsigned integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

OCaml

Innovation. Community. Security.