mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Add CCFloat.pi
This commit is contained in:
parent
18222af1a3
commit
4936cb60d4
2 changed files with 6 additions and 0 deletions
|
|
@ -38,6 +38,8 @@ let max_finite_value = Stdlib.max_float
|
|||
|
||||
let epsilon = Stdlib.epsilon_float
|
||||
|
||||
let pi = 0x1.921fb54442d18p+1
|
||||
|
||||
let is_nan x = Stdlib.(classify_float x = Stdlib.FP_nan)
|
||||
|
||||
let add = (+.)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ val epsilon : t
|
|||
(** [epsilon] is the smallest positive float x such that [1.0 +. x <> 1.0].
|
||||
Equal to {!Stdlib.epsilon_float}. *)
|
||||
|
||||
val pi : t
|
||||
(** [pi] is the constant pi. The ratio of a circunference to its diameter.
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val is_nan : t -> bool
|
||||
(** [is_nan f] returns [true] if f is NaN, [false] otherwise. *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue