Legend:
Library
Module
Module type
Parameter
Class
Class type
Safe operations on integers.
This module provides operations on the type int of integers. Values of this type may be either 31 bits on 32-bit processors or 63 bits on 64-bit processors. Operations which overflow raise exception Number.Overflow.
This module implements Number.Numeric, Number.Bounded, Number.Discrete.
modulo a b computes the remainder of the integer division of a by b. This is defined only if b <> 0.
The result of modulo a b is a number m between 0 and abs ( b - 1 ) if a >= 0 or between ~- ( abs ( b - 1 ) ) if a < 0 and such that a * k + (abs b) = m, for some k.
Convert the given floating-point number to integer, discarding the fractional part (truncate towards 0). The result of the conversion is undefined if, after truncation, the number is outside the range [Int.min_int, Int.max_int].
Convert the given string to an 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.
raisesFailure
if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.
The comparison function for integers, with the same specification as Pervasives.compare. Along with the type t, this function compare allows the module Int to be passed as argument to the functors Set.Make and Map.Make.