Something went wrong. Try again.
forked from coq/coq
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899(************************************************************************)(* * The Rocq Prover / The Rocq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)
type t
val uint_size : intval maxuint31 : t
(* conversion to int *)val of_int : int -> tval to_int2 : t -> int * int (* msb, lsb *)val of_int64 : Int64.t -> tval to_int64 : t -> Int64.t(*val of_uint : int -> t *)(** [int_min n m] returns the minimum of [n] and [m], [m] must be in [0, 2^30-1]. *)val to_int_min : t -> int -> int
(* conversion to float *)val of_float : float -> tval to_float : t -> float
val hash : t -> int
(* conversion to a string *)val to_string : t -> string
val compile : t -> string
(* constants *)val zero : tval one : t
(* logical operations *)val l_sl : t -> t -> tval l_sr : t -> t -> tval l_and : t -> t -> tval l_xor : t -> t -> tval l_or : t -> t -> t
(* Arithmetic operations *)val a_sr : t -> t -> tval add : t -> t -> tval sub : t -> t -> tval mul : t -> t -> tval div : t -> t -> tval rem : t -> t -> t
val diveucl : t -> t -> t * t
(* Signed arithmetic opeartions *)val divs : t -> t -> tval rems : t -> t -> t
(* Specific arithmetic operations *)val mulc : t -> t -> t * tval addmuldiv : t -> t -> t -> t
(** [div21 xh xl y] returns [q % 2^63, r] s.t. [xh * 2^63 + xl = q * y + r] and [r < y]. When [y] is [0], returns [0, 0]. *)val div21 : t -> t -> t -> t * t
(* comparison *)val lt : t -> t -> boolval equal : t -> t -> boolval le : t -> t -> boolval compare : t -> t -> int
(* signed comparision *)val lts : t -> t -> boolval les : t -> t -> boolval compares : t -> t -> int
(* head and tail *)val head0 : t -> tval tail0 : t -> t
val is_uint63 : Obj.t -> bool
(* Arithmetic with explicit carries *)
(* Analog of Numbers.Abstract.Cyclic.carry *)type 'a carry = C0 of 'a | C1 of 'a
val addc : t -> t -> t carryval addcarryc : t -> t -> t carryval subc : t -> t -> t carryval subcarryc : t -> t -> t carry