module Decimal:sig..end
decimal type alias provides more readable serializations to s-expressions, at
the cost of lower precision. For example:
# sexp_of_decimal 3.000000000001;;
- : Sexp.t = 3
# sexp_of_float 3.000000000001;;
- : Sexp.t = 3.0000000000010000889
Also, the decimal sexp-converter will fail when provided with nan or infinity.
# float_of_sexp (Sexp.Atom "nan");;
- : float = nan
# decimal_of_sexp (Sexp.Atom "nan");;
Exception:
(Sexplib.Conv.Of_sexp_error (Failure common.ml.Decimal_nan_or_inf) nan).
typet =float
val compare : t -> t -> intval t_of_sexp : Sexplib.Sexp.t -> tval sexp_of_t : t -> Sexplib.Sexp.tval bin_t : t Bin_prot.Type_class.tval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int -> t) Bin_prot.Read.readerval bin_reader_t : t Bin_prot.Type_class.readerval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_writer_t : t Bin_prot.Type_class.writer