Module Int32

module Int32 = struct ... end 
Simple values
zero int32
one int32
minus_one int32
The 32-bit integers 0, 1, -1.
max_int int32
min_int int32


neg : int32 -> int32
Unary negation.

add : int32 -> int32 -> int32

sub : int32 -> int32 -> int32

mul : int32 -> int32 -> int32

div : int32 -> int32 -> int32
Integer division. Raise Division_by_zero if the second argument is zero.

rem : int32 -> int32 -> int32
Integer remainder. If x >= 0 and y > 0, the result of Int32.rem x y satisfies the following properties: 0 <= Int32.rem x y < y and x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y). If y = 0, Int32.rem x y raises Division_by_zero. If x < 0 or y < 0, the result of Int32.rem x y is not specified and depends on the platform.

succ : int32 -> int32
Successor. Int32.succ x is Int32.add x

pred : int32 -> int32
Predecessor. Int32.pred x is Int32.sub x

abs : int32 -> int32
Return the absolute value of its argument.

logand : int32 -> int32 -> int32
Bitwise logical and.

logor : int32 -> int32 -> int32
Bitwise logical or.

logxor : int32 -> int32 -> int32
Bitwise logical exclusive or.

lognot : int32 -> int32
Bitwise logical negation

shift_left : int32 -> int -> int32
Int32.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 32.

shift_right : int32 -> int -> int32
Int32.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.

shift_right_logical : int32 -> int -> int32
Int32.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.

of_int : int -> int32
Convert the given integer (type int) to a 32-bit integer (type int32).

to_int : int32 -> int

of_float : float -> int32
Convert the given floating-point number to a 32-bit integer, discarding the fractional part (truncate towards 0). The result of the conversion is undefined if, after truncation, the number is outside the range Int32.min_int, Int32.max_int.

to_float : int32 -> float
Convert the given 32-bit integer to a floating-point number.

of_string : string -> int32
Convert the given string to a 32-bit integer. The string is read in decimal (by default) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively. Raise Failure "int_of_string" if the given string is not a valid representation of an integer.

to_string : int32 -> string
Return the string representation of its argument, in signed decimal.

format : string -> int32 -> string
Int32.format fmt n return the string representation of the 32-bit integer n in the format specified by fmt. fmt is a Printf-style format containing exactly one %d, %i, %u, %x, %X or %o conversion specification. See the documentation of the Printf module for more information,