Module CCNativeint.Infix
val (/) : t -> t -> t
x / y
is the integer quotient ofx
andy
. Integer division. RaiseDivision_by_zero
if the second argumenty
is zero. This division rounds the real quotient of its arguments towards zero, as specified forStdlib
.(/).
val (mod) : t -> t -> t
x mod y
is the integer remainder ofx / y
. Ify <> zero
, the result ofx mod y
satisfies the following properties:zero <= x mod y < abs y
andx = ((x / y) * y) + (x mod y)
. Ify = 0
,x mod y
raisesDivision_by_zero
.
val (lsl) : t -> int -> t
x lsl y
shiftsx
to the left byy
bits. The result is unspecified ify < 0
ory >= bitsize
, wherebitsize
is32
on a 32-bit platform and64
on a 64-bit platform.
val (lsr) : t -> int -> t
x lsr y
shiftsx
to the right byy
bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign ofx
. The result is unspecified ify < 0
ory >= bitsize
.