more doc (close #118)

This commit is contained in:
Simon Cruanes 2017-04-19 22:38:59 +02:00
parent 77ed135493
commit 9aa5d08f96
2 changed files with 21 additions and 1 deletions

View file

@ -68,11 +68,23 @@ val sign_exn : t -> int
@since 0.7 *)
val to_int : t -> int
(** Alias to {!int_of_float}.
Unspecified if outside of the range of integers. *)
val of_int : int -> t
(** Alias to {!float_of_int} *)
val to_string : t -> string
val of_string : string -> t
val of_string_exn : string -> t
(** Alias to {!float_of_string}
@raise Failure in case of failure
@since NEXT_RELEASE *)
val of_string : string -> t
(** Alias to {!float_of_string}.
@deprecated since NEXT_RELEASE, use {!of_string_exn} instead
@raise Failure in case of failure *)
val equal_precision : epsilon:t -> t -> t -> bool
(** Equality with allowed error up to a non negative epsilon value *)

View file

@ -53,24 +53,32 @@ val to_int : t -> int
val of_int : int -> t option
val of_int_exn : int -> t
(** Alias to {!Int64.of_int}
@raise Failure in case of failure *)
val to_int32 : t -> int32
val of_int32 : int32 -> t option
val of_int32_exn : int32 -> t
(** Alias to {!Int64.of_int32}
@raise Failure in case of failure *)
val to_nativeint : t -> nativeint
val of_nativeint : nativeint -> t option
val of_nativeint_exn : nativeint -> t
(** Alias to {!Int64.of_nativeint}
@raise Failure in case of failure *)
val to_float : t -> float
val of_float : float -> t option
val of_float_exn : float -> t
(** Alias to {!Int64.of_float}
@raise Failure in case of failure *)
val to_string : t -> string