package bap-std
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Arithmetic raised into Or_error
monad
All binary integer operations are only well defined on operands with equal sizes.
Module Int
provides a set of integer operations that do not raise exceptions, but return values raised to an Or_error monad.
Example:
Z.(i16 v1 + i16 v2 / int 16 v3)
,
or just:
Z.(!$v1 + !$v2 / !$v3)
.
!$v
lifts v
to an Or_error monad. It is, essentially, the same as Ok v
The following lifter will check that their operand has a corresponding width.
of_word_size w
creates a lifter for a specified word size w
, i.e. either i64
or i32
include Integer.S with type t = t Core_kernel.Or_error.t
type t = t Core_kernel.Or_error.t
include Integer.Base with type t := t
val zero : t
element neutral to the addition
val one : t
element neutral to the multiplication
lnot x
is a logical negation of x
(1-complement)
logand x y
is a conjunction of x
and y
A common set of infix operators
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page