include sig ... endval hash_fold_t : Ppx_hash_lib.Std.Hash.state ‑> t ‑> Ppx_hash_lib.Std.Hash.stateval hash : t ‑> Ppx_hash_lib.Std.Hash.hash_valueSexp conversions represent values as decimals of up to nine decimal places if
possible, or else as (x + y/z) where x is decimal and y and z are integers. So
for example, 1/3 <-> (0.333333333 + 1/3000000000). In string and sexp conversions,
values with denominator of zero are special-cased: 0/0 <-> "nan", 1/0 <-> "inf", and
-1/0 <-> "-inf".
include Core_kernel.Sexpable with type t := tval t_of_sexp : Base__.Sexplib.Sexp.t ‑> tval sexp_of_t : t ‑> Base__.Sexplib.Sexp.tinclude Core_kernel.Comparable with type t := tinclude Core_kernel__.Comparable_intf.S_commoninclude Base.Comparable_intf.Sinclude Base.Comparable_intf.Polymorphic_compareascending is identical to compare. descending x y = ascending y x. These are
intended to be mnemonic when used like List.sort ~cmp:ascending and List.sort
~cmp:descending, since they cause the list to be sorted in ascending or descending
order, respectively.
clamp_exn t ~min ~max returns t', the closest value to t such that
between t' ~low:min ~high:max is true.
Raises if not (min <= max).
val clamp : t ‑> min:t ‑> max:t ‑> t Base.Or_error.tinclude Base.Comparator.S with type t := tval comparator : (t, comparator_witness) Base.Comparator.comparatorinclude Base.Comparable_intf.Validate with type t := tval validate_lbound : min:t Base.Maybe_bound.t ‑> t Base.Validate.checkval validate_ubound : max:t Base.Maybe_bound.t ‑> t Base.Validate.checkval validate_bound : min:t Base.Maybe_bound.t ‑> max:t Base.Maybe_bound.t ‑> t Base.Validate.checkmodule Replace_polymorphic_compare : Core_kernel__.Comparable_intf.Polymorphic_compare with type t := tmodule Map : Core_kernel__.Core_map.S with type Key.t = t with type Key.comparator_witness = comparator_witnessmodule Set : Core_kernel__.Core_set.S with type Elt.t = t with type Elt.comparator_witness = comparator_witnessinclude Core_kernel.Hashable with type t := tinclude Core_kernel.Hashable.Commonval hash : t ‑> Core_kernel__.Import.intval compare : t ‑> t ‑> Core_kernel__.Import.intval hashable : t Core_kernel.Hashable.Hashtbl.Hashable.tmodule Table : Core_kernel.Hashable.Hashtbl.S with type key = tmodule Hash_set : Core_kernel.Hash_set.S with type elt = tmodule Hash_queue : Core_kernel.Hash_queue.S with type Key.t = tgen produces values with an order of magnitude (roughly the number of digits) in the
numerator and denominator proportional to Quickcheck.Generator.size. Also includes
values with zero in the denominator.
include Core_kernel.Binable with type t := tinclude Core_kernel__.Binable0.S_only_functions with type t := tval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int ‑> t) Bin_prot.Read.readerThis function only needs implementation if t exposed to be a polymorphic variant.
Despite what the type reads, this does *not* produce a function after reading;
instead it takes the constructor tag (int) before reading and reads the rest of the
variant t afterwards.
val bin_shape_t : Bin_prot.Shape.tval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tgen produces values with an order of magnitude (roughly the number of digits) in the
numerator and denominator proportional to Quickcheck.Generator.size. Also includes
values with zero in the denominator.
val zero : tval one : tval ten : tval hundred : tval thousand : tval million : tval billion : tval trillion : tval tenth : tval hundredth : tval thousandth : tval millionth : tval billionth : tval trillionth : tBeware: 2 ** 8_000_000 will take at least a megabyte to store the result,
and multiplying numbers a megabyte long is slow no matter how clever your algorithm.
Be careful to ensure the second argument is reasonably-sized.
Beware: 2 ** 8_000_000 will take at least a megabyte to store the result,
and multiplying numbers a megabyte long is slow no matter how clever your algorithm.
Be careful to ensure the second argument is reasonably-sized.
val iround : ?dir:[ `Down | `Up | `Nearest | `Zero ] ‑> ?to_multiple_of:int ‑> t ‑> int optionNone if the result would overflow or to_multiple_of is zero.
val iround_exn : ?dir:[ `Down | `Up | `Nearest | `Zero ] ‑> ?to_multiple_of:int ‑> t ‑> intException if the result would overflow or to_multiple_of is zero.
val to_string : t ‑> stringDecimal. Output is truncated (not rounded) to nine decimal places, so may be lossy.
Consider using sexp_of_t if you need lossless stringification.
val to_int_exn : t ‑> intval is_zero : t ‑> boolval sign : t ‑> intval of_string : string ‑> tval of_int : int ‑> tval of_float : float ‑> tval pp : Format.formatter ‑> t ‑> unitval gen_finite : t Core_kernel.Quickcheck.Generator.tgen_finite is like gen but excludes values with zero in the denominator.
val gen_uniform_excl : t ‑> t ‑> t Core_kernel.Quickcheck.Generator.tgen_uniform_excl lower_bound upper_bound produces a uniform distribution between
lower_bound and upper_bound, exclusive, in units based on the fractional parts of
the bounds plus a number of decimal places proportional to
Quickcheck.Generator.size.
val gen_incl : t ‑> t ‑> t Core_kernel.Quickcheck.Generator.tgen_incl lower_bound upper_bound produces a distribution of values between
lower_bound and upper_bound, inclusive, that is approximately uniform with extra
weight given to producing the endpoints lower_bound and upper_bound.
module Stable : sig ... endmodule O : sig ... end