ItvUtils.IntBoundIntBound - Enriches arbitrary precision integers with +∞ and -∞.
Useful as interval bounds.
val zero : tval one : tval minus_one : tUseful constants
val of_int : int -> tval of_int64 : int64 -> tExact conversion from machine integers.
val of_float : float -> tConversion with truncation from floats. Handles infinites. Raises an exception on NaNs.
val infinite : int -> tConstructs an infinity with the given sign. Zero maps to zero.
val pow2 : int -> tA power of two. The argument must be positive.
val sign : t -> intSign of x: -1, 0, or 1.
val is_finite : t -> boolWhether x is finite or not.
Total order. Returns -1 (strictly smaller), 0 (equal), or 1 (strictly greater).
val is_zero : t -> boolval is_nonzero : t -> boolval is_positive : t -> boolval is_negative : t -> boolval is_positive_strict : t -> boolval is_negative_strict : t -> boolSign predicates.
val hash : t -> intHashing function.
val to_string : t -> stringval print : out_channel -> t -> unitval fprint : Format.formatter -> t -> unitEuclidian division. Always defined: 0 / 0 = 0, x / +∞ = 0, x / 0 = sign(x) * ∞
Remainder. rem x y has the sign of x, rem x (-y) = rem x y, and rem x +∞ = x. rem +∞ y and rem x 0 are undefined (invalid argument exception).
Euclidian remainder. erem x y >= 0, rem x y < |b| and a = b * ediv a b + erem a b. rem +∞ y and rem x 0 are undefined (invalid argument exception).
Left bitshift. Undefined if the second argument is negative (invalid argument exception). Returns an infinity if the second argument is too large.
Right bitshift, rounding towards -∞. Undefined if the second argument is negative (invalid argument exception). Returns zero if the second argument is too large.
Right bitshift, rounding towards 0 (truncation). Undefined if the second argument is negative (invalid argument exception). Returns zero if the second argument is too large.