55include module type of Int
66(* * @inline *)
77
8- type t = int
9-
10- val zero : t
11- (* * [zero] is the integer [0].
12- @since 3.0 *)
13-
14- val one : t
15- (* * [one] is the integer [1].
16- @since 3.0 *)
17-
18- val minus_one : t
19- (* * [minus_one] is the integer [-1].
20- @since 3.0 *)
21-
22- val add : t -> t -> t
23- (* * [add x y] is [x + y].
24- @since 3.0 *)
25-
26- val sub : t -> t -> t
27- (* * [sub x y] is [x - y].
28- @since 3.0 *)
29-
30- val mul : t -> t -> t
31- (* * [mul x y] is [x * y].
32- @since 3.0 *)
33-
34- val div : t -> t -> t
35- (* * [div x y] is [x / y]
36- @since 3.0 *)
37-
38- val succ : t -> t
39- (* * [succ x] is [x + 1].
40- @since 3.0 *)
41-
42- val pred : t -> t
43- (* * [pred x] is [x - 1].
44- @since 3.0 *)
45-
46- val abs : t -> t
47- (* * [abs x] is the absolute value of [x]. It is [x] if [x] is positive
48- and [neg x] otherwise.
49- @since 3.0 *)
50-
51- val max_int : t
52- (* * [max_int] is the maximum integer.
53- @since 3.0 *)
54-
55- val min_int : t
56- (* * [min_int] is the minimum integer.
57- @since 3.0 *)
58-
59- val compare : t -> t -> int
60- (* * [compare x y] is the comparison function for integers
61- with the same specification as {!Stdlib.compare}. *)
62-
63- val equal : t -> t -> bool
64- (* * [equal x y] is [true] iff [x] and [y] are equal.
65- Equality function for integers. *)
66-
678val hash : t -> int
689(* * [hash x] computes the hash of [x]. *)
6910
7011val sign : t -> int
7112(* * [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
7213 Same as [compare x 0].*)
7314
74- val neg : t -> t
75- (* * [neg x] is [- x].
76- Unary negation.
77- @since 0.5 *)
78-
7915val pow : t -> t -> t
8016(* * [pow base exponent] returns [base] raised to the power of [exponent].
8117 [pow x y = x^y] for positive integers [x] and [y].
@@ -103,22 +39,6 @@ val random_range : int -> int -> t random_gen
10339val pp : t printer
10440(* * [pp ppf x] prints the integer [x] on [ppf]. *)
10541
106- val to_float : t -> float
107- (* * [to_float] is the same as [float_of_int]
108- @since 3.0*)
109-
110- [@@@ ocaml.warning " -32" ]
111-
112- val of_float : float -> t
113- (* * [to_float] is the same as [int_of_float]
114- @since 3.0*)
115-
116- [@@@ ocaml.warning " +32" ]
117-
118- val to_string : t -> string
119- (* * [to_string x] returns the string representation of the integer [x], in signed decimal.
120- @since 0.13 *)
121-
12242val of_string : string -> t option
12343(* * [of_string s] converts the given string [s] into an integer.
12444 Safe version of {!of_string_exn}.
@@ -130,11 +50,6 @@ val of_string_exn : string -> t
13050 @raise Failure in case of failure.
13151 @since 3.0 *)
13252
133- val of_float : float -> t
134- (* * [of_float x] converts the given floating-point number [x] to an integer.
135- Alias to {!int_of_float}.
136- @since 3.0 *)
137-
13853val pp_binary : t printer
13954(* * [pp_binary ppf x] prints [x] on [ppf].
14055 Print as "0b00101010".
@@ -173,34 +88,6 @@ val popcount : t -> int
17388(* * Number of bits set to 1
17489 @since 3.0 *)
17590
176- val logand : t -> t -> t
177- (* * [logand] is the same as [(land)].
178- @since 3.0 *)
179-
180- val logor : t -> t -> t
181- (* * [logand] is the same as [(lor)].
182- @since 3.0 *)
183-
184- val logxor : t -> t -> t
185- (* * [logxor] is the same as [(lxor)].
186- @since 3.0 *)
187-
188- val lognot : t -> t
189- (* * [logand] is the same as [lnot].
190- @since 3.0 *)
191-
192- val shift_left : t -> int -> t
193- (* * [shift_left] is the same as [(lsl)].
194- @since 3.0 *)
195-
196- val shift_right : t -> int -> t
197- (* * [shift_right] is the same as [(asr)].
198- @since 3.0 *)
199-
200- val shift_right_logical : t -> int -> t
201- (* * [shift_right_logical] is the same as [(lsr)].
202- @since 3.0 *)
203-
20491(* * {2 Infix Operators}
20592
20693 @since 0.17 *)
0 commit comments