aboutsummaryrefslogtreecommitdiffstats
path: root/flocq/Core/Fcore_float_prop.v
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@inria.fr>2015-09-22 15:41:50 +0200
committerGuillaume Melquiond <guillaume.melquiond@inria.fr>2015-09-22 15:41:50 +0200
commit0af966a42eb60e9af43f9a450d924758a83946c6 (patch)
tree2bef73e80a8a80da1c47deee66dc825feac45bdd /flocq/Core/Fcore_float_prop.v
parentc212ab7a8adea516db72f17d818393629dbde1b3 (diff)
downloadcompcert-0af966a42eb60e9af43f9a450d924758a83946c6.tar.gz
compcert-0af966a42eb60e9af43f9a450d924758a83946c6.zip
Upgrade to Flocq 2.5.0.
Note: this version of Flocq is compatible with both Coq 8.4 and 8.5.
Diffstat (limited to 'flocq/Core/Fcore_float_prop.v')
-rw-r--r--flocq/Core/Fcore_float_prop.v31
1 files changed, 31 insertions, 0 deletions
diff --git a/flocq/Core/Fcore_float_prop.v b/flocq/Core/Fcore_float_prop.v
index e1535bc9..8199ede6 100644
--- a/flocq/Core/Fcore_float_prop.v
+++ b/flocq/Core/Fcore_float_prop.v
@@ -233,6 +233,37 @@ rewrite <- F2R_0 with (Fexp f).
now apply F2R_lt_compat.
Qed.
+Theorem F2R_neq_0_compat :
+ forall f : float beta,
+ (Fnum f <> 0)%Z ->
+ (F2R f <> 0)%R.
+Proof.
+intros f H H1.
+apply H.
+now apply F2R_eq_0_reg with (Fexp f).
+Qed.
+
+
+Lemma Fnum_ge_0_compat: forall (f : float beta),
+ (0 <= F2R f)%R -> (0 <= Fnum f)%Z.
+Proof.
+intros f H.
+case (Zle_or_lt 0 (Fnum f)); trivial.
+intros H1; contradict H.
+apply Rlt_not_le.
+now apply F2R_lt_0_compat.
+Qed.
+
+Lemma Fnum_le_0_compat: forall (f : float beta),
+ (F2R f <= 0)%R -> (Fnum f <= 0)%Z.
+Proof.
+intros f H.
+case (Zle_or_lt (Fnum f) 0); trivial.
+intros H1; contradict H.
+apply Rlt_not_le.
+now apply F2R_gt_0_compat.
+Qed.
+
(** Floats and bpow *)
Theorem F2R_bpow :
forall e : Z,