Scalar.Integer_comparisontype t = | CeqEqual (signed or unsigned - same result)
*)| CneNot equal (signed or unsigned - same result)
*)| CltLess than (signed)
*)| CgtGreater than (signed)
*)| CleLess or equal (signed)
*)| CgeGreater or equal (signed)
*)| CultLess than (unsigned)
*)| CugtGreater than (unsigned)
*)| CuleLess or equal (unsigned)
*)| CugeGreater or equal (unsigned)
*)Integer comparison operators supporting both signed and unsigned comparisons.
The first six operators (Ceq through Cge) perform signed comparisons, treating the most significant bit as a sign bit in two's complement representation.
The last four operators (Cult through Cuge) perform unsigned comparisons, treating all bits as magnitude. This means negative signed integers are compared as large positive values:
Examples with 8-bit integers:
val to_string : t -> stringval create : Signedness.t -> lt:bool -> eq:bool -> gt:bool -> (t, bool) resultCreates a comparison operator from the behavior that should happen in each condition, with the given signedness. If every case is the same, returns Error of that case