package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/octez-libs.plompiler/Plompiler/LibCircuit/Limbs/index.html
Module LibCircuit.Limbs
Source
This module is a more generic version of Bytes, where each scalar stores an nb_bits
-bit number.
Parameters
module N : sig ... end
Signature
input_bytes ~le b
returns the representation of b
that Plompiler expects as input. le
can be used to set the endianness.
constant ~le b
returns the constant b
as a Plompiler value. le
can be used to set the endianness.
of_scalar ~total_nb_bits b
converts the scalar b
of size total_nb_bits
in bits into the tl
representation.
to_scalar b
return the scalar representing the value b
.
of_bool_list b
converts the list of bits in little-endian order into the tl
representation.
to_bool_list b
returns the list of bits in little-endian order, representing the value b
.
xor a b
returns the exclusive disjunction of a
and b
.
rotate_right b n
shifts the bits right by n positions, so that each bit is less significant. The least significant bit becomes the most significant i.e. it is "rotated". rotate_right bs (length bl) = bl
shift_right b n
shifts all bits right by n positions, so that each bit is less significant. The least signigicant bit is lost and the most significant bit is set to zero. More precisely, if we interpret the b
as an integer, shift_right b n = b / 2^n