Module Float64_common
type t= floattis currently implemented by OCaml'sfloattype.Beware: NaNs have a sign and a payload, while they should be indistinguishable from Coq's perspective.
val is_nan : t -> boolTest functions for special values to avoid calling
classify
val is_infinity : t -> boolval is_neg_infinity : t -> boolval of_string : string -> tval to_hex_string : t -> stringPrint a float exactly as an hexadecimal value (exact decimal * printing would be possible but sometimes requires more than 700 * digits).
val to_string : t -> stringPrint a float as a decimal value. The printing is not exact (the * real value printed is not always the given floating-point value), * however printing is precise enough that forall float
f, *of_string (to_decimal_string f) = f.
val compile : t -> stringval of_float : float -> tval to_float : t -> floatAll NaNs are normalized to
Stdlib.nan.- since
- 8.15
val sign : t -> boolReturn
truefor "-",falsefor "+".
val eq : t -> t -> boolval lt : t -> t -> boolval le : t -> t -> boolval compare : t -> t -> float_comparisonThe IEEE 754 float comparison. * NotComparable is returned if there is a NaN in the arguments
val classify : t -> float_classval of_uint63 : Uint63.t -> tLink with integers
val frshiftexp : t -> t * Uint63.tval ldshiftexp : t -> Uint63.t -> tval next_up : t -> tval next_down : t -> tval equal : t -> t -> boolReturn true if two floats are equal. * All NaN values are considered equal.