mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
remove deprecated CCFloat.sign
This commit is contained in:
parent
112dd7da1b
commit
7e86889f1e
2 changed files with 0 additions and 10 deletions
|
|
@ -71,11 +71,6 @@ type 'a random_gen = Random.State.t -> 'a
|
||||||
let pp buf = Printf.bprintf buf "%f"
|
let pp buf = Printf.bprintf buf "%f"
|
||||||
let print fmt = Format.pp_print_float fmt
|
let print fmt = Format.pp_print_float fmt
|
||||||
|
|
||||||
let sign (a:float) =
|
|
||||||
if a < 0.0 then -1
|
|
||||||
else if a > 0.0 then 1
|
|
||||||
else 0
|
|
||||||
|
|
||||||
let fsign a =
|
let fsign a =
|
||||||
if is_nan a then nan
|
if is_nan a then nan
|
||||||
else if a = 0. then a
|
else if a = 0. then a
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,6 @@ val random : t -> t random_gen
|
||||||
val random_small : t random_gen
|
val random_small : t random_gen
|
||||||
val random_range : t -> t -> t random_gen
|
val random_range : t -> t -> t random_gen
|
||||||
|
|
||||||
val sign : t -> int
|
|
||||||
(** [sign t] is one of [-1, 0, 1], depending on how the float
|
|
||||||
compares to [0.]
|
|
||||||
@deprecated since 0.7 use {! fsign} or {!sign_exn} since it's more accurate *)
|
|
||||||
|
|
||||||
val fsign : t -> float
|
val fsign : t -> float
|
||||||
(** [fsign x] is one of [-1., -0., +0., +1.], or [nan] if [x] is NaN.
|
(** [fsign x] is one of [-1., -0., +0., +1.], or [nan] if [x] is NaN.
|
||||||
@since 0.7 *)
|
@since 0.7 *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue