aboutsummaryrefslogtreecommitdiff
path: root/theories/Floats/FloatOps.v
diff options
context:
space:
mode:
authorErik Martin-Dorel2019-06-02 17:59:15 +0200
committerPierre Roux2019-11-01 10:21:20 +0100
commitd5f49c85630e25f2c2b45cf03cc3f589e7cdaf5f (patch)
treeb8ec10fc68e3809156aff26db39a627237603a4c /theories/Floats/FloatOps.v
parentf155ba664a782f000e278d97ee5666e2e7d2adea (diff)
docs: Add refman+stdlib documentation
Diffstat (limited to 'theories/Floats/FloatOps.v')
-rw-r--r--theories/Floats/FloatOps.v6
1 files changed, 5 insertions, 1 deletions
diff --git a/theories/Floats/FloatOps.v b/theories/Floats/FloatOps.v
index 6cc7cb0568..5ffbfc7215 100644
--- a/theories/Floats/FloatOps.v
+++ b/theories/Floats/FloatOps.v
@@ -1,6 +1,7 @@
Require Import ZArith Int63 SpecFloat PrimFloat.
-(* Properties of the Binary64 IEEE 754 format *)
+(** * Derived operations and mapping between primitive [float]s and [spec_float]s *)
+
Definition prec := 53%Z.
Definition emax := 1024%Z.
Notation emin := (emin prec emax).
@@ -15,6 +16,9 @@ Definition ldexp f e :=
Definition ulp f := ldexp one (fexp prec emax (snd (frexp f))).
+(** [Prim2SF] is an injective function that will be useful to express
+the properties of the implemented Binary64 format (see [FloatAxioms]).
+*)
Definition Prim2SF f :=
if is_nan f then S754_nan
else if is_zero f then S754_zero (get_sign f)