Commit bd689358 authored by Guillaume Melquiond's avatar Guillaume Melquiond

Proved monotony for any rounding function based on integer rounding.

parent 084610db
......@@ -1074,7 +1074,7 @@ left.
generalize (proj1 Hu).
unfold generic_format.
fold e.
set (cu := Float beta (Ztrunc (F2R (Float beta (m + 1) e) * bpow (- canonic_exponent beta fexp (F2R (Float beta (m + 1) e)))))
set (cu := Float beta (Ztrunc (scaled_mantissa beta fexp (F2R (Float beta (m + 1) e))))
(canonic_exponent beta fexp (F2R (Float beta (m + 1) e)))).
intros Hu'.
assert (Hcu : canonic beta fexp cu).
......
......@@ -76,7 +76,7 @@ now ring_simplify (prec + xe - xe)%Z.
(* . *)
unfold generic_format.
set (ex := canonic_exponent beta FLT_exp x).
set (mx := Ztrunc (x * bpow (- ex))).
set (mx := Ztrunc (scaled_mantissa beta FLT_exp x)).
intros Hx.
rewrite Hx.
eexists ; repeat split ; simpl.
......@@ -139,7 +139,7 @@ intros x Hx.
destruct (Req_dec x 0) as [Hx0|Hx0].
rewrite Hx0.
split ; intros _ ; apply generic_format_0.
unfold generic_format.
unfold generic_format, scaled_mantissa.
now rewrite (FLT_canonic_FLX x Hx0 Hx).
Qed.
......@@ -182,7 +182,7 @@ destruct (Req_dec x 0) as [Hx0|Hx0].
rewrite Hx0.
split ; intros _ ; apply generic_format_0.
destruct Hx as [Hx|Hx].
unfold generic_format.
unfold generic_format, scaled_mantissa.
now rewrite (FLT_canonic_FIX x Hx0 Hx).
(* extra case *)
rewrite <- (Rabs_pos_eq (bpow (emin + prec))) in Hx. 2: apply bpow_ge_0.
......
......@@ -112,7 +112,7 @@ assert (Hf: FLX_exp (projT1 (ln_beta beta x)) = FIX_exp (ex - prec) (projT1 (ln_
unfold FIX_exp, FLX_exp.
now rewrite ln_beta_unique with (1 := Hx2).
split ;
unfold generic_format, canonic_exponent ;
unfold generic_format, scaled_mantissa, canonic_exponent ;
now rewrite Hf.
Qed.
......
......@@ -101,7 +101,7 @@ split.
intros H.
now elim H.
apply Zle_refl.
unfold generic_format, canonic_exponent, FTZ_exp in Hx.
unfold generic_format, scaled_mantissa, canonic_exponent, FTZ_exp in Hx.
destruct (ln_beta beta x) as (ex, Hx4).
simpl in Hx.
specialize (Hx4 Hx3).
......
This diff is collapsed.
......@@ -258,7 +258,7 @@ intros x d u Hf Hd Hu.
generalize (proj1 Hd).
unfold generic_format.
set (ed := canonic_exponent beta fexp d).
set (md := Ztrunc (d * Fcore_Raux.bpow beta (-ed))).
set (md := Ztrunc (scaled_mantissa beta fexp d)).
intros Hd1.
destruct (Zeven_odd_dec md) as [He|Ho].
right.
......@@ -270,7 +270,7 @@ left.
generalize (proj1 Hu).
unfold generic_format.
set (eu := canonic_exponent beta fexp u).
set (mu := Ztrunc (u * Fcore_Raux.bpow beta (-eu))).
set (mu := Ztrunc (scaled_mantissa beta fexp u)).
intros Hu1.
rewrite Hu1.
eexists ; repeat split.
......
......@@ -41,6 +41,7 @@ intros H.
apply Fx.
unfold F, generic_format.
unfold F2R. simpl.
unfold scaled_mantissa.
fold ex.
rewrite <- H.
rewrite Ztrunc_Z2R.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment