diff options
| author | Pierre Roux | 2018-10-23 17:52:39 +0200 |
|---|---|---|
| committer | Pierre Roux | 2019-11-01 10:20:43 +0100 |
| commit | 73580b9c5f206e2d3a7107123d207515f2330978 (patch) | |
| tree | 6a39aacd27992c59140cc91b6a40058f469ac41f /kernel/float64.mli | |
| parent | 5f1270242f71a0a1da7c868967e1071d28ed83fb (diff) | |
Add primitive floats to 'native_compute'
* Float added to is_value/get_value to avoid stack overflows
(cf. #7646)
* beware of the use of Array.map with floats (cf. comment in the
makeblock function)
NB: From here one, the configure option "-native-compiler no"
is no longer needed.
Diffstat (limited to 'kernel/float64.mli')
| -rw-r--r-- | kernel/float64.mli | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/float64.mli b/kernel/float64.mli index 580004126d..1e6ea8bb96 100644 --- a/kernel/float64.mli +++ b/kernel/float64.mli @@ -15,10 +15,14 @@ indistinguishable from Coq's perspective. *) type t val is_nan : t -> bool +val is_infinity : t -> bool +val is_neg_infinity : t -> bool val to_string : t -> string val of_string : string -> t +val compile : t -> string + val of_float : float -> t val opp : t -> t @@ -29,32 +33,55 @@ type float_comparison = FEq | FLt | FGt | FNotComparable (** The IEEE 754 float comparison. * NotComparable is returned if there is a NaN in the arguments *) val compare : t -> t -> float_comparison +[@@ocaml.inline always] type float_class = | PNormal | NNormal | PSubn | NSubn | PZero | NZero | PInf | NInf | NaN val classify : t -> float_class +[@@ocaml.inline always] val mul : t -> t -> t +[@@ocaml.inline always] + val add : t -> t -> t +[@@ocaml.inline always] + val sub : t -> t -> t +[@@ocaml.inline always] + val div : t -> t -> t +[@@ocaml.inline always] + val sqrt : t -> t +[@@ocaml.inline always] (** Link with integers *) val of_int63 : Uint63.t -> t +[@@ocaml.inline always] + val normfr_mantissa : t -> Uint63.t +[@@ocaml.inline always] (** Shifted exponent extraction *) +val eshift : int + val frshiftexp : t -> t * Uint63.t (* float remainder, shifted exponent *) +[@@ocaml.inline always] + val ldshiftexp : t -> Uint63.t -> t +[@@ocaml.inline always] val next_up : t -> t +[@@ocaml.inline always] + val next_down : t -> t +[@@ocaml.inline always] (** Return true if two floats are equal. * All NaN values are considered equal. *) val equal : t -> t -> bool +[@@ocaml.inline always] val hash : t -> int |
