diff options
author | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-12-16 23:38:15 +0100 |
---|---|---|
committer | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-12-16 23:38:15 +0100 |
commit | ed7f246f082cc92283e773b6b6b4eb4828a3c2ca (patch) | |
tree | 816fc3c55ffb29b190812320eea2fa81cbcd390e /kvx | |
parent | dab5ceabe0b11daa0199a6a48c73adbee9fafb4c (diff) | |
download | compcert-kvx-ed7f246f082cc92283e773b6b6b4eb4828a3c2ca.tar.gz compcert-kvx-ed7f246f082cc92283e773b6b6b4eb4828a3c2ca.zip |
glue in ranges
Diffstat (limited to 'kvx')
-rw-r--r-- | kvx/FPDivision.v | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kvx/FPDivision.v b/kvx/FPDivision.v index 1b81b632..7790d31e 100644 --- a/kvx/FPDivision.v +++ b/kvx/FPDivision.v @@ -359,6 +359,10 @@ Qed. Opaque approx_inv. +Theorem Znearest_le + : forall choice (x y : R), (x <= y)%R -> Znearest choice x <= Znearest choice y. +Admitted. + Theorem approx_div_correct : forall (ge : genv) (sp: val) cmenv memenv (le : letenv) (expr_a expr_b : expr) (a b : int) @@ -436,7 +440,10 @@ Proof. } assert(0 <= prod_r <= 4294967295) as prod_r_range. - { admit. + { unfold prod_r. + rewrite <- (Znearest_IZR (fun x => negb (Z.even x)) 0). + replace 4294967295 with (ZnearestE (17179869181 / 4)%R) by admit. + split; apply Znearest_le; lra. } replace (_ && _ ) with true; cycle 1. |