Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
This file is part of the Flocq formalization of floating-point
arithmetic in Coq: http://flocq.gforge.inria.fr/
Copyright (C) 2009-2018 Sylvie Boldo
Copyright (C) 2009-2018 Guillaume Melquiond
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
COPYING file for more details.
Copyright (C) 2009-2018 Guillaume Melquiond
Require Import Raux Defs Round_pred Float_prop. Section Generic. Variable beta : radix. Notation bpow e := (bpow beta e). Section Format. Variable fexp : Z -> Z.
To be a good fexp
Class Valid_exp := valid_exp : forall k : Z, ( (fexp k < k)%Z -> (fexp (k + 1) <= k)%Z ) /\ ( (k <= fexp k)%Z -> (fexp (fexp k + 1) <= fexp k)%Z /\ forall l : Z, (l <= fexp k)%Z -> fexp l = fexp k ). Context { valid_exp_ : Valid_exp }.beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall k l : Z, (fexp k < k)%Z -> (k <= l)%Z -> (fexp l < l)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall k l : Z, (fexp k < k)%Z -> (k <= l)%Z -> (fexp l < l)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(k <= l)%Z(fexp l < l)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(k <= l)%Z~ (fexp l >= l)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(k <= l)%ZHl:(fexp l >= l)%ZFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(k <= l)%ZHl:(l <= fexp l)%ZFalseomega. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(k <= l)%ZHl:(l <= fexp l)%ZH':(k <= fexp l)%Z -> fexp k = fexp lFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall k l : Z, (fexp k < k)%Z -> (l <= k)%Z -> (fexp l < k)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall k l : Z, (fexp k < k)%Z -> (l <= k)%Z -> (fexp l < k)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%Z(fexp l < k)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%Z~ (fexp l >= k)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%ZH':(fexp l >= k)%ZFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%ZH':(k <= fexp l)%ZFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%ZH':(k <= fexp l)%ZHl:(l <= fexp l)%ZFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%ZH':(k <= fexp l)%ZHl:(fexp (fexp l + 1) <= fexp l)%Z /\ (forall l0 : Z, (l0 <= fexp l)%Z -> fexp l0 = fexp l)Falseomega. Qed. Definition cexp x := fexp (mag beta x). Definition canonical (f : float beta) := Fexp f = cexp (F2R f). Definition scaled_mantissa x := (x * bpow (- cexp x))%R. Definition generic_format (x : R) := x = F2R (Float beta (Ztrunc (scaled_mantissa x)) (cexp x)).beta:radixfexp:Z -> Zvalid_exp_:Valid_expk, l:ZHk:(fexp k < k)%ZH:(l <= k)%ZH':(k <= fexp l)%ZHl:(fexp (fexp l + 1) <= fexp l)%Z /\ (forall l0 : Z, (l0 <= fexp l)%Z -> fexp l0 = fexp l)H1:fexp k = fexp lFalse
Basic facts
beta:radixfexp:Z -> Zvalid_exp_:Valid_expgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_exp0%R = F2R {| Fnum := Ztrunc (0 * bpow (- cexp 0)); Fexp := cexp 0 |}now rewrite Ztrunc_IZR, F2R_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exp0%R = F2R {| Fnum := Ztrunc 0; Fexp := cexp 0 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, cexp (- x) = cexp xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, cexp (- x) = cexp xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rcexp (- x) = cexp xnow rewrite mag_opp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rfexp (mag beta (- x)) = fexp (mag beta x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, cexp (Rabs x) = cexp xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, cexp (Rabs x) = cexp xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rcexp (Rabs x) = cexp xnow rewrite mag_abs. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rfexp (mag beta (Rabs x)) = fexp (mag beta x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> exists f : float beta, x = F2R f /\ canonical fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> exists f : float beta, x = F2R f /\ canonical fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xexists f : float beta, x = F2R f /\ canonical fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xexists f : float beta, F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} = F2R f /\ canonical fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xF2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} = F2R ?f /\ canonical ?fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xcanonical {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}now rewrite <- Hx. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xFexp {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} = cexp (F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, (fexp (e + 1) <= e)%Z -> generic_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, (fexp (e + 1) <= e)%Z -> generic_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Zgeneric_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Zbpow e = F2R {| Fnum := Ztrunc (bpow e * bpow (- fexp (mag beta (bpow e)))); Fexp := fexp (mag beta (bpow e)) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Zbpow e = F2R {| Fnum := Ztrunc (bpow e * bpow (- fexp (e + 1))); Fexp := fexp (e + 1) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Zbpow e = F2R {| Fnum := Ztrunc (bpow (e + - fexp (e + 1))); Fexp := fexp (e + 1) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Zbpow e = F2R {| Fnum := Ztrunc (IZR (beta ^ (e + - fexp (e + 1)))); Fexp := fexp (e + 1) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Z(0 <= e + - fexp (e + 1))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Zbpow e = F2R {| Fnum := beta ^ (e + - fexp (e + 1)); Fexp := fexp (e + 1) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Z(0 <= e + - fexp (e + 1))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%ZF2R {| Fnum := 1; Fexp := e |} = F2R {| Fnum := beta ^ (e + - fexp (e + 1)); Fexp := fexp (e + 1) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Z(0 <= e + - fexp (e + 1))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%ZF2R {| Fnum := 1 * beta ^ (e - fexp (e + 1)); Fexp := fexp (e + 1) |} = F2R {| Fnum := beta ^ (e + - fexp (e + 1)); Fexp := fexp (e + 1) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Z(0 <= e + - fexp (e + 1))%Znow apply Zle_minus_le_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZH:(fexp (e + 1) <= e)%Z(0 <= e + - fexp (e + 1))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, (fexp e <= e)%Z -> generic_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, (fexp e <= e)%Z -> generic_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%Zgeneric_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%Z(fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%ZH:(fexp e < e)%Z(fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%ZH:fexp e = e(fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%ZH:fexp e = e(fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%ZH:fexp e = e(fexp (fexp e + 1) <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%ZH:fexp e = e(e <= fexp e)%Zapply Z.le_refl. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp e <= e)%ZH:fexp e = e(e <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall m e : Z, (m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall m e : Z, (m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m = 0%Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m = 0%Zgeneric_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m = 0%Zgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Z(m <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Z) -> F2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- cexp (F2R {| Fnum := m; Fexp := e |}))); Fexp := cexp (F2R {| Fnum := m; Fexp := e |}) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):Z(m <> 0%Z -> (e' <= e)%Z) -> F2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- e')); Fexp := e' |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:m <> 0%Z -> (e' <= e)%ZF2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- e')); Fexp := e' |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%ZF2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- e')); Fexp := e' |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%ZF2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (IZR (Fnum {| Fnum := m; Fexp := e |}) * bpow (Fexp {| Fnum := m; Fexp := e |}) * bpow (- e')); Fexp := e' |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%ZF2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (IZR m * bpow e * bpow (- e')); Fexp := e' |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%ZF2R {| Fnum := m * beta ^ (e - e'); Fexp := e' |} = F2R {| Fnum := Ztrunc (IZR m * bpow e * bpow (- e')); Fexp := e' |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%Z(m * beta ^ (e - e'))%Z = Ztrunc (IZR m * bpow e * bpow (- e'))beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%Z(m * beta ^ (e - e'))%Z = Ztrunc (IZR (m * beta ^ (e + - e')))beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%Z(0 <= e + - e')%Znow apply Zle_left. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZZm:m <> 0%Ze':=cexp (F2R {| Fnum := m; Fexp := e |}):ZHe:(e' <= e)%Z(0 <= e + - e')%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (f : float beta), F2R f = x -> (x <> 0%R -> (cexp x <= Fexp f)%Z) -> generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (f : float beta), F2R f = x -> (x <> 0%R -> (cexp x <= Fexp f)%Z) -> generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:float betaH1:F2R f = xH2:x <> 0%R -> (cexp x <= Fexp f)%Zgeneric_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm, e:ZH1:F2R {| Fnum := m; Fexp := e |} = xH2:x <> 0%R -> (cexp x <= Fexp {| Fnum := m; Fexp := e |})%Zgeneric_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm, e:ZH1:F2R {| Fnum := m; Fexp := e |} = xH2:x <> 0%R -> (cexp x <= Fexp {| Fnum := m; Fexp := e |})%Zm <> 0%Z -> (cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm, e:ZH1:F2R {| Fnum := m; Fexp := e |} = xH2:x <> 0%R -> (cexp x <= e)%ZH3:m <> 0%Z(cexp (F2R {| Fnum := m; Fexp := e |}) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm, e:ZH1:F2R {| Fnum := m; Fexp := e |} = xH2:x <> 0%R -> (cexp x <= e)%ZH3:m <> 0%Zx <> 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm, e:ZH1:F2R {| Fnum := m; Fexp := e |} = xH2:x <> 0%R -> (cexp x <= e)%ZH3:m <> 0%ZY:x = 0%Rm = 0%Znow rewrite H1. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm, e:ZH1:F2R {| Fnum := m; Fexp := e |} = xH2:x <> 0%R -> (cexp x <= e)%ZH3:m <> 0%ZY:x = 0%RF2R {| Fnum := m; Fexp := e |} = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall m e : Z, canonical {| Fnum := m; Fexp := e |} -> canonical {| Fnum := - m; Fexp := e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall m e : Z, canonical {| Fnum := m; Fexp := e |} -> canonical {| Fnum := - m; Fexp := e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZH:canonical {| Fnum := m; Fexp := e |}canonical {| Fnum := - m; Fexp := e |}now rewrite F2R_Zopp, cexp_opp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZH:canonical {| Fnum := m; Fexp := e |}Fexp {| Fnum := - m; Fexp := e |} = cexp (F2R {| Fnum := - m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall m e : Z, canonical {| Fnum := m; Fexp := e |} -> canonical {| Fnum := Z.abs m; Fexp := e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall m e : Z, canonical {| Fnum := m; Fexp := e |} -> canonical {| Fnum := Z.abs m; Fexp := e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZH:canonical {| Fnum := m; Fexp := e |}canonical {| Fnum := Z.abs m; Fexp := e |}now rewrite F2R_Zabs, cexp_abs. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZH:canonical {| Fnum := m; Fexp := e |}Fexp {| Fnum := Z.abs m; Fexp := e |} = cexp (F2R {| Fnum := Z.abs m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expcanonical {| Fnum := 0; Fexp := fexp (mag beta 0) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expcanonical {| Fnum := 0; Fexp := fexp (mag beta 0) |}now rewrite F2R_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expfexp (mag beta 0) = fexp (mag beta (F2R {| Fnum := 0; Fexp := fexp (mag beta 0) |}))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall f1 f2 : float beta, canonical f1 -> canonical f2 -> F2R f1 = F2R f2 -> f1 = f2beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall f1 f2 : float beta, canonical f1 -> canonical f2 -> F2R f1 = F2R f2 -> f1 = f2beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:Zcanonical {| Fnum := m1; Fexp := e1 |} -> canonical {| Fnum := m2; Fexp := e2 |} -> F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |} -> {| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZFexp {| Fnum := m1; Fexp := e1 |} = cexp (F2R {| Fnum := m1; Fexp := e1 |}) -> Fexp {| Fnum := m2; Fexp := e2 |} = cexp (F2R {| Fnum := m2; Fexp := e2 |}) -> F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |} -> {| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:Ze1 = cexp (F2R {| Fnum := m1; Fexp := e1 |}) -> e2 = cexp (F2R {| Fnum := m2; Fexp := e2 |}) -> F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |} -> {| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZH1:e1 = cexp (F2R {| Fnum := m1; Fexp := e1 |})H2:e2 = cexp (F2R {| Fnum := m2; Fexp := e2 |})H:F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |}{| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZH1:e1 = cexp (F2R {| Fnum := m2; Fexp := e2 |})H2:e2 = cexp (F2R {| Fnum := m2; Fexp := e2 |})H:F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |}{| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZH1:e1 = e2H2:e2 = cexp (F2R {| Fnum := m2; Fexp := e2 |})H:F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |}{| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZH1:e1 = e2H:F2R {| Fnum := m1; Fexp := e1 |} = F2R {| Fnum := m2; Fexp := e2 |}{| Fnum := m1; Fexp := e1 |} = {| Fnum := m2; Fexp := e2 |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZH1:e1 = e2H:F2R {| Fnum := m1; Fexp := e2 |} = F2R {| Fnum := m2; Fexp := e2 |}{| Fnum := m1; Fexp := e2 |} = {| Fnum := m2; Fexp := e2 |}apply eq_F2R with (1 := H). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expm1, e1, m2, e2:ZH1:e1 = e2H:F2R {| Fnum := m1; Fexp := e2 |} = F2R {| Fnum := m2; Fexp := e2 |}m1 = m2beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> scaled_mantissa x = IZR (Ztrunc (scaled_mantissa x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> scaled_mantissa x = IZR (Ztrunc (scaled_mantissa x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xscaled_mantissa x = IZR (Ztrunc (scaled_mantissa x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(x * bpow (- cexp x))%R = IZR (Ztrunc (x * bpow (- cexp x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} * bpow (- cexp x))%R = IZR (Ztrunc (F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} * bpow (- cexp x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(IZR (Fnum {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}) * bpow (- cexp x))%R = IZR (Ztrunc (IZR (Fnum {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}) * bpow (- cexp x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x) * bpow (- cexp x))%R = IZR (Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x) * bpow (- cexp x)))now rewrite Ztrunc_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xIZR (Ztrunc (scaled_mantissa x)) = IZR (Ztrunc (IZR (Ztrunc (scaled_mantissa x))))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (scaled_mantissa x * bpow (cexp x))%R = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (scaled_mantissa x * bpow (cexp x))%R = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(scaled_mantissa x * bpow (cexp x))%R = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(x * bpow (- cexp x) * bpow (cexp x))%R = xapply Rmult_1_r. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(x * bpow 0)%R = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expscaled_mantissa 0 = 0%Rapply Rmult_0_l. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expscaled_mantissa 0 = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, scaled_mantissa (- x) = (- scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, scaled_mantissa (- x) = (- scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rscaled_mantissa (- x) = (- scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(- x * bpow (- cexp (- x)))%R = (- (x * bpow (- cexp x)))%Rnow rewrite Ropp_mult_distr_l_reverse. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(- x * bpow (- cexp x))%R = (- (x * bpow (- cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, scaled_mantissa (Rabs x) = Rabs (scaled_mantissa x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, scaled_mantissa (Rabs x) = Rabs (scaled_mantissa x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rscaled_mantissa (Rabs x) = Rabs (scaled_mantissa x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(Rabs x * bpow (- cexp (Rabs x)))%R = Rabs (x * bpow (- cexp x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(Rabs x * bpow (- cexp x))%R = (Rabs x * Rabs (bpow (- cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rbpow (- cexp x) = Rabs (bpow (- cexp x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRabs (bpow (- cexp x)) = bpow (- cexp x)apply bpow_ge_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> generic_format (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> generic_format (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xgeneric_format (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(- x)%R = F2R {| Fnum := Ztrunc (scaled_mantissa (- x)); Fexp := cexp (- x) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(- x)%R = F2R {| Fnum := Ztrunc (- scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(- x)%R = F2R {| Fnum := - Ztrunc (scaled_mantissa x); Fexp := cexp x |}now apply f_equal. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format x(- x)%R = (- F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> generic_format (Rabs x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> generic_format (Rabs x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xgeneric_format (Rabs x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xRabs x = F2R {| Fnum := Ztrunc (scaled_mantissa (Rabs x)); Fexp := cexp (Rabs x) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xRabs x = F2R {| Fnum := Ztrunc (Rabs (scaled_mantissa x)); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xRabs x = F2R {| Fnum := Z.abs (Ztrunc (scaled_mantissa x)); Fexp := cexp x |}now apply f_equal. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:generic_format xRabs x = Rabs (F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format (Rabs x) -> generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format (Rabs x) -> generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rgeneric_format (Rabs x) -> generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(if Rcase_abs x then (- x)%R else x) = F2R {| Fnum := Ztrunc (scaled_mantissa (if Rcase_abs x then (- x)%R else x)); Fexp := cexp (if Rcase_abs x then (- x)%R else x) |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(- x)%R = F2R {| Fnum := Ztrunc (scaled_mantissa (- x)); Fexp := cexp (- x) |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rx = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(- x)%R = F2R {| Fnum := - Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rx = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(- x)%R = F2R {| Fnum := - Ztrunc (scaled_mantissa x); Fexp := cexp x |}x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rx = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(- x)%R = F2R {| Fnum := - Ztrunc (scaled_mantissa x); Fexp := cexp x |}(- - x)%R = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rx = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(- x)%R = F2R {| Fnum := - Ztrunc (scaled_mantissa x); Fexp := cexp x |}(- - F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%R = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rx = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}easy. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rx = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} -> x = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= Rabs x < bpow ex)%R -> cexp x = fexp exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= Rabs x < bpow ex)%R -> cexp x = fexp exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%Rcexp x = fexp exnow rewrite mag_unique with (1 := Hx). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%Rfexp (mag beta x) = fexp exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> cexp x = fexp exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> cexp x = fexp exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%Rcexp x = fexp exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= Rabs x < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= x < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%R(0 <= x)%Rapply bpow_ge_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%R(0 <= bpow (ex - 1))%R
Properties when the real number is "small" (kind of subnormal)
beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> (0 < x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> (0 < x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < bpow (ex - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) * bpow (fexp ex) < 1 * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow (- fexp ex) * bpow (fexp ex) < 1 * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x * bpow 0 < 1 * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(x < bpow (fexp ex))%Rnow apply bpow_le. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(bpow ex <= bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (Rabs x < bpow ex)%R -> (ex <= fexp ex)%Z -> (Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (Rabs x < bpow ex)%R -> (ex <= fexp ex)%Z -> (Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%Z(Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x = 0%R(Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x = 0%R(0 < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(Rabs (scaled_mantissa x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(scaled_mantissa (Rabs x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(Rabs x * bpow (- cexp (Rabs x)) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(Rabs x * bpow (- cexp x) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%R(Rabs x * bpow (- fexp (mag beta x)) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':x <> 0%R -> (bpow (ex' - 1) <= Rabs x < bpow ex')%R(Rabs x * bpow (- fexp (Build_mag_prop beta x ex' Ex')) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':x <> 0%R -> (bpow (ex' - 1) <= Rabs x < bpow ex')%R(Rabs x * bpow (- fexp ex') < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%R(Rabs x * bpow (- fexp ex') < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%R(ex' <= fexp ex')%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%R(ex' <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%RH:(ex' <= fexp ex)%Z(ex' <= fexp ex')%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%R(ex' <= ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%RH:(ex' <= fexp ex)%Z(ex' <= fexp ex')%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%R(bpow (ex' - 1) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%RH:(ex' <= fexp ex)%Z(ex' <= fexp ex')%Znow rewrite (proj2 (proj2 (valid_exp _) He)). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZEx:(Rabs x < bpow ex)%RHe:(ex <= fexp ex)%ZZx:x <> 0%Rex':ZEx':(bpow (ex' - 1) <= Rabs x < bpow ex')%RH:(ex' <= fexp ex)%Z(ex' <= fexp ex')%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x = 0%R(Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x = 0%R(0 < bpow (mag beta 0 - cexp 0))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(Rabs (scaled_mantissa x) < bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(bpow (mag beta (scaled_mantissa x)) <= bpow (mag beta x - cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(mag beta (scaled_mantissa x) <= mag beta x - cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(mag beta (x * bpow (- cexp x)) <= mag beta x - cexp x)%Zapply Z.le_refl. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%R(mag beta x + - cexp x <= mag beta x - cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, x <> 0%R -> generic_format x -> (cexp x < mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, x <> 0%R -> generic_format x -> (cexp x < mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format x(cexp x < mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format x~ (cexp x >= mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format x~ (fexp (mag beta x) >= mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format xex:ZEx:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R~ (fexp ex >= ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R~ (fexp ex >= ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(fexp ex >= ex)%ZFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZx:x <> 0%RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%Z(Rabs (scaled_mantissa x) < 1)%R -> Falsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%Rx = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%RF2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%RF2R {| Fnum := 0; Fexp := cexp x |} = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R0%Z = Ztrunc (scaled_mantissa x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R0%Z = Ztrunc (scaled_mantissa x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R(Z.abs (Ztrunc (scaled_mantissa x)) < 1)%Z -> 0%Z = Ztrunc (scaled_mantissa x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R(Z.abs (Ztrunc (scaled_mantissa x)) < 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R(Z.abs (Ztrunc (scaled_mantissa x)) < 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R(IZR (Z.abs (Ztrunc (scaled_mantissa x))) < 1)%Rnow rewrite <- scaled_mantissa_generic. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RGx:generic_format xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RH:(ex <= fexp ex)%ZZx:(Rabs (scaled_mantissa x) < 1)%R(Rabs (IZR (Ztrunc (scaled_mantissa x))) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> Zfloor (x * bpow (- fexp ex)) = 0%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> Zfloor (x * bpow (- fexp ex)) = 0%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZZfloor (x * bpow (- fexp ex)) = 0%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 <= x * bpow (- fexp ex) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 <= x * bpow (- fexp ex) < 1)%Rsplit ; try apply Rlt_le ; apply H. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZH:(0 < x * bpow (- fexp ex) < 1)%R(0 <= x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> Zceil (x * bpow (- fexp ex)) = 1%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> Zceil (x * bpow (- fexp ex)) = 1%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZZceil (x * bpow (- fexp ex)) = 1%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(IZR (1 - 1) < x * bpow (- fexp ex) <= 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Z(0 < x * bpow (- fexp ex) <= 1)%Rsplit ; try apply Rlt_le ; apply H. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZH:(0 < x * bpow (- fexp ex) < 1)%R(0 < x * bpow (- fexp ex) <= 1)%R
Generic facts about any format
beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (m : Z), let e := cexp x in (F2R {| Fnum := m; Fexp := e |} < x < F2R {| Fnum := m + 1; Fexp := e |})%R -> ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (m : Z), let e := cexp x in (F2R {| Fnum := m; Fexp := e |} < x < F2R {| Fnum := m + 1; Fexp := e |})%R -> ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHx2:(x < F2R {| Fnum := m + 1; Fexp := e |})%RHf:generic_format xFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHx2:(x < F2R {| Fnum := m + 1; Fexp := e |})%RHf:generic_format x(F2R {| Fnum := m + 1; Fexp := e |} <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(F2R {| Fnum := m + 1; Fexp := e |} <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(F2R {| Fnum := m + 1; Fexp := e |} <= F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(F2R {| Fnum := m + 1; Fexp := e |} <= F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := e |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(m + 1 <= Ztrunc (scaled_mantissa x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(m < Ztrunc (scaled_mantissa x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(IZR m < IZR (Ztrunc (scaled_mantissa x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(IZR m < scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(0 < bpow e)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(IZR m * bpow e < scaled_mantissa x * bpow e)%Rnow rewrite scaled_mantissa_mult_bpow. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rm:Ze:=cexp x:ZHx:(F2R {| Fnum := m; Fexp := e |} < x)%RHf:generic_format x(IZR m * bpow e < scaled_mantissa x * bpow e)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall f : float beta, canonical f -> generic_format (F2R f)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall f : float beta, canonical f -> generic_format (F2R f)beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:canonical {| Fnum := m; Fexp := e |}generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:Fexp {| Fnum := m; Fexp := e |} = cexp (F2R {| Fnum := m; Fexp := e |})generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})generic_format (F2R {| Fnum := m; Fexp := e |})beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})F2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- cexp (F2R {| Fnum := m; Fexp := e |}))); Fexp := cexp (F2R {| Fnum := m; Fexp := e |}) |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})F2R {| Fnum := m; Fexp := e |} = F2R {| Fnum := Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- e)); Fexp := e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})m = Ztrunc (F2R {| Fnum := m; Fexp := e |} * bpow (- e))beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})m = Ztrunc (IZR (Fnum {| Fnum := m; Fexp := e |}) * bpow (Fexp {| Fnum := m; Fexp := e |}) * bpow (- e))beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})m = Ztrunc (IZR m * bpow e * bpow (- e))now rewrite Ztrunc_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expm, e:ZHf:e = cexp (F2R {| Fnum := m; Fexp := e |})m = Ztrunc (IZR m)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall emin : Z, (forall e : Z, (emin <= fexp e)%Z) -> forall x : R, (0 < x)%R -> generic_format x -> (bpow emin <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall emin : Z, (forall e : Z, (emin <= fexp e)%Z) -> forall x : R, (0 < x)%R -> generic_format x -> (bpow emin <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(bpow emin <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(bpow emin <= F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(bpow emin <= bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(bpow (fexp (mag beta x)) <= F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(bpow (fexp (mag beta x)) <= F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(0 < Ztrunc (scaled_mantissa x))%Znow rewrite <- Fx. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expemin:ZEmin:forall e : Z, (emin <= fexp e)%Zx:RHx:(0 < x)%RFx:generic_format x(0 < F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall prec : Z, (forall e : Z, (e - prec <= fexp e)%Z) -> forall x : R, (Rabs x < bpow (prec + cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:R(Rabs x < bpow (prec + cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x = 0%R(Rabs x < bpow (prec + cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%R(Rabs x < bpow (prec + cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x = 0%R(0 < bpow (prec + cexp 0))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%R(Rabs x < bpow (prec + cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%R(Rabs x < bpow (prec + cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%R(Rabs x < bpow (prec + fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%Rex:ZEx:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(Rabs x < bpow (prec + fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(Rabs x < bpow (prec + fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow ex <= bpow (prec + fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expprec:ZHp:forall e : Z, (e - prec <= fexp e)%Zx:RHxz:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(ex <= prec + fexp ex)%Zomega. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expprec, ex:ZHp:(ex - prec <= fexp ex)%Zx:RHxz:x <> 0%REx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(ex <= prec + fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, generic_format (bpow e) -> (fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, generic_format (bpow e) -> (fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:generic_format (bpow e)(fexp (e + 1) <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:generic_format (bpow e)~ (fexp (e + 1) > e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z~ generic_format (bpow e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Zbpow e <> (IZR (Fnum {| Fnum := Ztrunc (bpow e * bpow (- fexp (mag beta (bpow e)))); Fexp := fexp (mag beta (bpow e)) |}) * bpow (Fexp {| Fnum := Ztrunc (bpow e * bpow (- fexp (mag beta (bpow e)))); Fexp := fexp (mag beta (bpow e)) |}))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Zbpow e <> (IZR (Ztrunc (bpow e * bpow (- fexp (mag beta (bpow e))))) * bpow (fexp (mag beta (bpow e))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Zbpow e <> (IZR (Ztrunc (bpow (e + - fexp (e + 1)))) * bpow (fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow e > IZR (Ztrunc (bpow (e + - fexp (e + 1)))) * bpow (fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow e > IZR (Zfloor (bpow (e + - fexp (e + 1)))) * bpow (fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(0 <= bpow (e + - fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow e > IZR (Zfloor (bpow (e + - fexp (e + 1)))) * bpow (fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow e > 0 * bpow (fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(0 <= bpow (e + - fexp (e + 1)) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow e > 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(0 <= bpow (e + - fexp (e + 1)) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(0 <= bpow (e + - fexp (e + 1)) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(0 <= bpow (e + - fexp (e + 1)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow (e + - fexp (e + 1)) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(bpow (e + - fexp (e + 1)) < IZR (0 + 1))%Rclear -He ; omega. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) > e)%Z(e + - fexp (e + 1) < 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, generic_format (bpow e) -> (fexp e <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall e : Z, generic_format (bpow e) -> (fexp e <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:generic_format (bpow e)(fexp e <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) <= e)%Z(fexp e <= e)%Zomega. Qed. Section Fcore_generic_round_pos.beta:radixfexp:Z -> Zvalid_exp_:Valid_expe:ZHe:(fexp (e + 1) <= e)%ZH:(fexp (e + 1) < e + 1)%Z -> (e <= e + 1)%Z -> (fexp e < e + 1)%Z(fexp e <= e)%Z
Rounding functions: R -> Z
Variable rnd : R -> Z. Class Valid_rnd := { Zrnd_le : forall x y, (x <= y)%R -> (rnd x <= rnd y)%Z ; Zrnd_IZR : forall n, rnd (IZR n) = n }. Context { valid_rnd : Valid_rnd }.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, rnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, rnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(rnd x <= Zfloor x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(rnd x <= Zfloor x)%Zrnd x = Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(rnd x <= Zfloor x)%Z(Zfloor x <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(rnd x <= Zfloor x)%Z(rnd (IZR (Zfloor x)) <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(rnd x <= Zfloor x)%Z(IZR (Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Zrnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(rnd x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(Zceil x <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(rnd x <= rnd (IZR (Zceil x)))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(Zceil x <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(Zceil x <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(Zceil x <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%Z(Zfloor x + 1 <= rnd x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%ZIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%ZIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < rnd x)%ZH:IZR (Zfloor x) = xFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor (IZR (Zfloor x)) < rnd (IZR (Zfloor x)))%ZH:IZR (Zfloor x) = xFalseapply Z.lt_irrefl with (1 := Hx). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:(Zfloor x < Zfloor x)%ZH:IZR (Zfloor x) = xFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, rnd x = Ztrunc x \/ rnd x = Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, rnd x = Ztrunc x \/ rnd x = Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rrnd x = Ztrunc x \/ rnd x = Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rrnd x = (if Rlt_bool x 0 then Zceil x else Zfloor x) \/ rnd x = (if Rlt_bool x 0 then Zfloor x else Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zfloor xrnd x = Zceil x \/ rnd x = Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zfloor xrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zceil x \/ rnd x = Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zfloor xrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zceil x \/ rnd x = Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zfloor x \/ rnd x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zceil x \/ rnd x = Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zfloor x \/ rnd x = Zceil xnow right. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:rnd x = Zceil xrnd x = Zfloor x \/ rnd x = Zceil x
the most useful one: R -> F
Definition round x := F2R (Float beta (rnd (scaled_mantissa x)) (cexp x)).beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall (x : R) (ex : Z), (fexp ex < ex)%Z -> (bpow (ex - 1) <= x < bpow ex)%R -> (bpow (ex - 1) <= round x <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall (x : R) (ex : Z), (fexp ex < ex)%Z -> (bpow (ex - 1) <= x < bpow ex)%R -> (bpow (ex - 1) <= round x <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= round x <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= F2R {| Fnum := rnd (x * bpow (- cexp x)); Fexp := cexp x |} <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= F2R {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |} <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= IZR (Fnum {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |}) * bpow (Fexp {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |}) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(bpow (ex - 1) <= IZR (rnd (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%R(* DN *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(bpow (ex - 1 + - fexp ex + fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(bpow (ex - 1 + - fexp ex) * bpow (fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(0 <= bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(bpow (ex - 1 + - fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(bpow (ex - 1 + - fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1 + - fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(0 <= ex - 1 + - fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1 + - fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1 + - fexp ex) <= IZR (Zfloor (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(IZR (beta ^ (ex - 1 - fexp ex)) <= IZR (Zfloor (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(beta ^ (ex - 1 - fexp ex) <= Zfloor (x * bpow (- fexp ex)))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(IZR (beta ^ (ex - 1 - fexp ex)) <= x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1 + - fexp ex) <= x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1) * bpow (- fexp ex) <= x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(0 <= bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - 1 - fexp ex)) = bpow (ex - 1 + - fexp ex)(bpow (ex - 1) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(0 < bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) * bpow (- fexp ex) <= x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex) * bpow (- fexp ex) <= x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) <= x * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%R(* UP *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(bpow (ex - 1) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(x <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(0 < bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(x * bpow (- fexp ex) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(x * bpow (- fexp ex) <= IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(x * bpow (- fexp ex) <= IZR (Zceil (x * bpow (- fexp ex))))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow (ex - fexp ex + fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex) <= bpow (ex - fexp ex) * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(0 <= bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) <= bpow (ex - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) <= bpow (ex - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(IZR (Zceil (x * bpow (- fexp ex))) <= bpow (ex - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(0 <= ex - fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(IZR (Zceil (x * bpow (- fexp ex))) <= bpow (ex - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(IZR (Zceil (x * bpow (- fexp ex))) <= bpow (ex - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(IZR (Zceil (x * bpow (- fexp ex))) <= IZR (beta ^ (ex - fexp ex)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(Zceil (x * bpow (- fexp ex)) <= beta ^ (ex - fexp ex))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x * bpow (- fexp ex) <= IZR (beta ^ (ex - fexp ex)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x * bpow (- fexp ex) <= bpow (ex - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x * bpow (- fexp ex) <= bpow (ex + - fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x * bpow (- fexp ex) <= bpow ex * bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(0 <= bpow (- fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x <= bpow ex)%Rapply Hx. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(fexp ex < ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Hf:IZR (beta ^ (ex - fexp ex)) = bpow (ex - fexp ex)(x < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall (x : R) (ex : Z), (ex <= fexp ex)%Z -> (bpow (ex - 1) <= x < bpow ex)%R -> round x = 0%R \/ round x = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall (x : R) (ex : Z), (ex <= fexp ex)%Z -> (bpow (ex - 1) <= x < bpow ex)%R -> round x = 0%R \/ round x = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%Rround x = 0%R \/ round x = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RF2R {| Fnum := rnd (x * bpow (- cexp x)); Fexp := cexp x |} = 0%R \/ F2R {| Fnum := rnd (x * bpow (- cexp x)); Fexp := cexp x |} = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RF2R {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |} = 0%R \/ F2R {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |} = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(IZR (Fnum {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |}) * bpow (Fexp {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |}))%R = 0%R \/ (IZR (Fnum {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |}) * bpow (Fexp {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |}))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%R(IZR (rnd (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (rnd (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)(* DN *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(IZR (Zfloor (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))IZR (Zfloor (x * bpow (- fexp ex))) = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))Zfloor (x * bpow (- fexp ex)) = 0%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(0 <= x * bpow (- fexp ex) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zfloor (x * bpow (- fexp ex))(0 < x * bpow (- fexp ex) < IZR (0 + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)(* UP *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = 0%R \/ (IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (Zceil (x * bpow (- fexp ex))) * bpow (fexp ex))%R = (1 * bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))IZR (Zceil (x * bpow (- fexp ex))) = 1%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))Zceil (x * bpow (- fexp ex)) = 1%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (1 - 1) < x * bpow (- fexp ex) <= 1)%Rnow apply mantissa_small_pos. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZHe:(ex <= fexp ex)%ZHx:(bpow (ex - 1) <= x < bpow ex)%RHr:rnd (x * bpow (- fexp ex)) = Zceil (x * bpow (- fexp ex))(IZR (1 - 1) < x * bpow (- fexp ex) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x y : R, (0 < x)%R -> (x <= y)%R -> (round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x y : R, (0 < x)%R -> (x <= y)%R -> (round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%Rey:ZHey:y <> 0%R -> (bpow (ey - 1) <= Rabs y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= Rabs x < bpow ex)%Rey:ZHey:y <> 0%R -> (bpow (ey - 1) <= Rabs y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= Rabs x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= Rabs y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= Rabs y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= Rabs x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= Rabs y < bpow ey)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= Rabs y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= Rabs y < bpow ey)%R(0 <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%R(ex <= ey)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%R(bpow (ex - 1) < bpow ey)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%R(x < bpow ey)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%Zfexp ex = fexp ey -> (round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(F2R {| Fnum := rnd (x * bpow (- fexp (mag beta x))); Fexp := fexp (mag beta x) |} <= F2R {| Fnum := rnd (y * bpow (- fexp (mag beta y))); Fexp := fexp (mag beta y) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(F2R {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |} <= F2R {| Fnum := rnd (y * bpow (- fexp (mag beta y))); Fexp := fexp (mag beta y) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(F2R {| Fnum := rnd (x * bpow (- fexp ex)); Fexp := fexp ex |} <= F2R {| Fnum := rnd (y * bpow (- fexp ey)); Fexp := fexp ey |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(F2R {| Fnum := rnd (x * bpow (- fexp ey)); Fexp := fexp ey |} <= F2R {| Fnum := rnd (y * bpow (- fexp ey)); Fexp := fexp ey |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(rnd (x * bpow (- fexp ey)) <= rnd (y * bpow (- fexp ey)))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(x * bpow (- fexp ey) <= y * bpow (- fexp ey))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZH:fexp ex = fexp ey(0 <= bpow (- fexp ey))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%R(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(ey <= fexp ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(ey <= fexp ey)%Zfexp ex = fexp eybeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(ey <= fexp ey)%Z(ex <= fexp ey)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':ex = ey(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%Z(round x <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%Z(bpow (ey - 1) <= round y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(ex <= fexp ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(ex <= fexp ex)%Z(0 <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(ex <= fexp ex)%Z(bpow (fexp ex) <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(ex <= fexp ex)%Z(bpow (fexp ex) <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(ex <= fexp ex)%Z(fexp ex <= ey - 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:forall l : Z, (l <= fexp ex)%Z -> fexp l = fexp ex(fexp ex <= ey - 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(ey <= fexp ex)%Z -> fexp ey = fexp ex(fexp ex <= ey - 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(round x <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(bpow ex <= bpow (ey - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(bpow ex <= bpow (ey - 1))%Rnow apply Z.lt_le_pred. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx, y:RHx:(0 < x)%RHxy:(x <= y)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rey:ZHey:(bpow (ey - 1) <= y < bpow ey)%RHe:(ex <= ey)%ZHeq:fexp ex = fexp ey -> (round x <= round y)%RHy1:(fexp ey < ey)%ZHe':(ex < ey)%ZHx1:(fexp ex < ex)%Z(ex <= ey - 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, generic_format x -> round x = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, generic_format x -> round x = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:generic_format xround x = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:generic_format xF2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:generic_format xF2R {| Fnum := rnd (IZR (Ztrunc (scaled_mantissa x))); Fexp := cexp x |} = xnow apply sym_eq. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx:generic_format xF2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndround 0 = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndround 0 = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndF2R {| Fnum := rnd (0 * bpow (- cexp 0)); Fexp := cexp 0 |} = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndF2R {| Fnum := rnd 0; Fexp := cexp 0 |} = 0%Rapply F2R_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndF2R {| Fnum := 0; Fexp := cexp 0 |} = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> round x = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> round x = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RH1:round x = 0%R(ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RH1:round x = 0%RV:(fexp ex < ex)%Z(ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RV:(fexp ex < ex)%Zround x <> 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RV:(fexp ex < ex)%Z(round x > 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RV:(fexp ex < ex)%Z(0 < bpow (ex - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RV:(fexp ex < ex)%Z(bpow (ex - 1) <= round x)%Rapply (round_bounded_large_pos); assumption. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:Rex:ZH:(bpow (ex - 1) <= x < bpow ex)%RV:(fexp ex < ex)%Z(bpow (ex - 1) <= round x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, (0 < x)%R -> generic_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndforall x : R, (0 < x)%R -> generic_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= Rabs x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= Rabs x < bpow ex)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%Rgeneric_format (round x)(* small *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%Zgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZHr:round x = 0%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZHr:round x = bpow (fexp ex)generic_format (bpow (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%Zgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZHr:round x = bpow (fexp ex)generic_format (bpow (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%Zgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%ZHr:round x = bpow (fexp ex)(fexp (fexp ex + 1) <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%Zgeneric_format (round x)(* large *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%Zgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%Z(bpow (ex - 1) <= round x <= bpow ex)%R -> generic_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(bpow ex <= round x)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(bpow ex <= round x)%Rgeneric_format (bpow ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(bpow ex <= round x)%R(fexp (ex + 1) <= ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%Rgeneric_format (round x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%Rrnd (scaled_mantissa x) <> 0%Z -> (cexp (F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |}) <= cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%R(cexp (F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |}) <= cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%R(fexp ex <= cexp x)%Znow apply Zeq_le. Qed. End Fcore_generic_round_pos.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rndx:RHx0:(0 < x)%Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHe:(fexp ex < ex)%ZHr1:(bpow (ex - 1) <= round x)%RHr2:(round x <= bpow ex)%RHr:(round x < bpow ex)%R(fexp ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd1 rnd2 : R -> Z, (forall x : R, rnd1 x = rnd2 x) -> forall x : R, round rnd1 x = round rnd2 xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd1 rnd2 : R -> Z, (forall x : R, rnd1 x = rnd2 x) -> forall x : R, round rnd1 x = round rnd2 xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd1, rnd2:R -> ZHext:forall x0 : R, rnd1 x0 = rnd2 x0x:Rround rnd1 x = round rnd2 xnow rewrite Hext. Qed. Section Zround_opp. Variable rnd : R -> Z. Context { valid_rnd : Valid_rnd rnd }. Definition Zrnd_opp x := Z.opp (rnd (-x)).beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd1, rnd2:R -> ZHext:forall x0 : R, rnd1 x0 = rnd2 x0x:RF2R {| Fnum := rnd1 (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := rnd2 (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndValid_rnd Zrnd_oppbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndValid_rnd Zrnd_opp(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, (x <= y)%R -> (Zrnd_opp x <= Zrnd_opp y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%R(Zrnd_opp x <= Zrnd_opp y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%R(- rnd (- x) <= - rnd (- y))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%R(- - rnd (- y) <= - - rnd (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%R(rnd (- y) <= rnd (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%R(- y <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = n(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall n : Z, Zrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndn:ZZrnd_opp (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndn:Z(- rnd (- IZR n))%Z = napply Z.opp_involutive. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndn:Z(- - n)%Z = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd (- x) = (- round Zrnd_opp x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd (- x) = (- round Zrnd_opp x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Rround rnd (- x) = (- round Zrnd_opp x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RF2R {| Fnum := rnd (scaled_mantissa (- x)); Fexp := cexp (- x) |} = (- F2R {| Fnum := Zrnd_opp (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RF2R {| Fnum := rnd (- scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := - Zrnd_opp (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Rrnd (- scaled_mantissa x) = (- Zrnd_opp (scaled_mantissa x))%Zexact (Z.opp_involutive _). Qed. End Zround_opp.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:R(- Zrnd_opp (scaled_mantissa x))%Z = rnd (- scaled_mantissa x)
IEEE-754 roundings: up, down and to zero
beta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Zfloorbeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Zfloorbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x y : R, (x <= y)%R -> (Zfloor x <= Zfloor y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Zfloor (IZR n) = napply Zfloor_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Zfloor (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Zceilbeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Zceilbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x y : R, (x <= y)%R -> (Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Zceil (IZR n) = napply Zceil_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Zceil (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Ztruncbeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Ztruncbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x y : R, (x <= y)%R -> (Ztrunc x <= Ztrunc y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Ztrunc (IZR n) = napply Ztrunc_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Ztrunc (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Zawaybeta:radixfexp:Z -> Zvalid_exp_:Valid_expValid_rnd Zawaybeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x y : R, (x <= y)%R -> (Zaway x <= Zaway y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Zaway (IZR n) = napply Zaway_IZR. Qed. Section monotone. Variable rnd : R -> Z. Context { valid_rnd : Valid_rnd rnd }.beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall n : Z, Zaway (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x = round Zfloor x \/ round rnd x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x = round Zfloor x \/ round rnd x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Rround rnd x = round Zfloor x \/ round rnd x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RF2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zfloor (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zceil (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zfloor (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zceil (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zceil (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}now rewrite Hx. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zceil (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x = round Ztrunc x \/ round rnd x = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x = round Ztrunc x \/ round rnd x = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Rround rnd x = round Ztrunc x \/ round rnd x = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RF2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Ztrunc (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zaway (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Ztrunc (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zaway (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zaway (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} \/ F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |}now rewrite Hx. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:rnd (scaled_mantissa x) = Zaway (scaled_mantissa x)F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, (x <= y)%R -> (round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, (x <= y)%R -> (round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x > 0)%R(round rnd x <= round rnd y)%R(* x < 0 *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%R(* . y < 0 *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(F2R {| Fnum := rnd (scaled_mantissa (- - x)); Fexp := cexp (- - x) |} <= F2R {| Fnum := rnd (scaled_mantissa (- - y)); Fexp := cexp (- - y) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(F2R {| Fnum := rnd (- scaled_mantissa (- x)); Fexp := cexp (- - x) |} <= F2R {| Fnum := rnd (- scaled_mantissa (- y)); Fexp := cexp (- - y) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(F2R {| Fnum := rnd (- scaled_mantissa (- x)); Fexp := cexp (- x) |} <= F2R {| Fnum := rnd (- scaled_mantissa (- y)); Fexp := cexp (- y) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(- F2R {| Fnum := rnd (- scaled_mantissa (- y)); Fexp := cexp (- y) |} <= - F2R {| Fnum := rnd (- scaled_mantissa (- x)); Fexp := cexp (- x) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(F2R {| Fnum := - rnd (- scaled_mantissa (- y)); Fexp := cexp (- y) |} <= F2R {| Fnum := - rnd (- scaled_mantissa (- x)); Fexp := cexp (- x) |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(0 < - y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(- y <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(- 0 < - y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(- y <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(y < 0)%R(- y <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%R(* . 0 <= y *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(F2R {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(Fnum {| Fnum := rnd (scaled_mantissa x); Fexp := cexp x |} <= 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(rnd (scaled_mantissa x) <= 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(rnd (scaled_mantissa x) <= rnd 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(scaled_mantissa x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(scaled_mantissa x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(scaled_mantissa x <= 0 * bpow (- fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= bpow (- fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= F2R {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= Fnum {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= rnd (scaled_mantissa y))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(rnd 0 <= rnd (scaled_mantissa y))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= scaled_mantissa y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= bpow (- cexp y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:(x < 0)%RHy:(0 <= y)%R(0 <= bpow (- cexp y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%R(* x = 0 *)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(round rnd 0 <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= Fnum {| Fnum := rnd (scaled_mantissa y); Fexp := cexp y |})%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= rnd (scaled_mantissa y))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(rnd 0 <= rnd (scaled_mantissa y))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= scaled_mantissa y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= bpow (- cexp y))%Rapply bpow_ge_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHxy:(x <= y)%RHx:x = 0%R(0 <= bpow (- cexp y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format x -> (x <= y)%R -> (x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format x -> (x <= y)%R -> (x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHx:generic_format xHxy:(x <= y)%R(x <= round rnd y)%Rnow apply round_le. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHx:generic_format xHxy:(x <= y)%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format y -> (x <= y)%R -> (round rnd x <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format y -> (x <= y)%R -> (round rnd x <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHy:generic_format yHxy:(x <= y)%R(round rnd x <= y)%Rnow apply round_le. Qed. End monotone.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:RHy:generic_format yHxy:(x <= y)%R(round rnd x <= round rnd y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall P : R -> R -> Prop, (forall rnd : R -> Z, Valid_rnd rnd -> forall x : R, (0 <= x)%R -> P x (round rnd x)) -> forall rnd : R -> Z, Valid_rnd rnd -> forall x : R, P (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall P : R -> R -> Prop, (forall rnd : R -> Z, Valid_rnd rnd -> forall x : R, (0 <= x)%R -> P x (round rnd x)) -> forall rnd : R -> Z, Valid_rnd rnd -> forall x : R, P (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RP (Rabs x) (Rabs (round rnd x))(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%RP (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%RP x (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(0 <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(0 <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(round rnd 0 <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (Rabs x) (Rabs (round rnd x))(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (Rabs x) (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (- x)%R (Rabs (round rnd x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (- x)%R (- round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (- x)%R (- round rnd (- - x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (- x)%R (- - round (Zrnd_opp rnd) (- x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%RP (- x)%R (round (Zrnd_opp rnd) (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(0 <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(- 0 <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(round rnd x <= round rnd 0)%Rnow apply Rlt_le. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expP:R -> R -> PropHP:forall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> P x0 (round rnd0 x0)rnd:R -> ZHr:Valid_rnd rndx:RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall (x : R) (ex : Z), (fexp ex < ex)%Z -> (bpow (ex - 1) <= Rabs x < bpow ex)%R -> (bpow (ex - 1) <= Rabs (round rnd x) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall (x : R) (ex : Z), (fexp ex < ex)%Z -> (bpow (ex - 1) <= Rabs x < bpow ex)%R -> (bpow (ex - 1) <= Rabs (round rnd x) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHr:Valid_rnd rndx:Rex:ZHe:(fexp ex < ex)%Z(bpow (ex - 1) <= Rabs x < bpow ex)%R -> (bpow (ex - 1) <= Rabs (round rnd x) <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHr:Valid_rnd rndx:Rex:ZHe:(fexp ex < ex)%Zforall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> (bpow (ex - 1) <= x0 < bpow ex)%R -> (bpow (ex - 1) <= round rnd0 x0 <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expex:ZHe:(fexp ex < ex)%Zforall rnd : R -> Z, Valid_rnd rnd -> forall x : R, (0 <= x)%R -> (bpow (ex - 1) <= x < bpow ex)%R -> (bpow (ex - 1) <= round rnd x <= bpow ex)%Rapply round_bounded_large_pos... Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expex:ZHe:(fexp ex < ex)%Zrnd':R -> ZHr:Valid_rnd rnd'x:R(bpow (ex - 1) <= x < bpow ex)%R -> (bpow (ex - 1) <= round rnd' x <= bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall (x : R) (ex : Z), (bpow (ex - 1) <= Rabs x < bpow ex)%R -> round rnd x = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall (x : R) (ex : Z), (bpow (ex - 1) <= Rabs x < bpow ex)%R -> round rnd x = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHr:Valid_rnd rndx:Rex:ZH1:(bpow (ex - 1) <= Rabs x < bpow ex)%RH2:round rnd x = 0%R(ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHr:Valid_rnd rndx:Rex:ZH1:(bpow (ex - 1) <= Rabs x < bpow ex)%RH2:round rnd x = 0%RRabs 0 = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHr:Valid_rnd rndx:Rex:ZH1:(bpow (ex - 1) <= Rabs x < bpow ex)%RH2:round rnd x = 0%RRabs (round rnd x) = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHr:Valid_rnd rndx:Rex:ZH1:(bpow (ex - 1) <= Rabs x < bpow ex)%RH2:round rnd x = 0%Rforall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> forall ex0 : Z, (bpow (ex0 - 1) <= x0 < bpow ex0)%R -> round rnd0 x0 = 0%R -> (ex0 <= fexp ex0)%Znow apply exp_small_round_0_pos. Qed. Section monotone_abs. Variable rnd : R -> Z. Context { valid_rnd : Valid_rnd rnd }.beta:radixfexp:Z -> Zrnd:R -> ZHr:Valid_rnd rndx:RHx:(0 <= x)%Rforall ex : Z, (bpow (ex - 1) <= x < bpow ex)%R -> round rnd x = 0%R -> (ex <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format x -> (x <= Rabs y)%R -> (x <= Rabs (round rnd y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format x -> (x <= Rabs y)%R -> (x <= Rabs (round rnd y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:Rgeneric_format x -> (x <= Rabs y)%R -> (x <= Rabs (round rnd y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:Rforall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> generic_format x -> (x <= x0)%R -> (x <= round rnd0 x0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall rnd : R -> Z, Valid_rnd rnd -> forall x0 : R, (0 <= x0)%R -> generic_format x -> (x <= x0)%R -> (x <= round rnd x0)%Rapply round_ge_generic... Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rrnd':R -> ZHrnd:Valid_rnd rnd'y:RHy:(0 <= y)%Rgeneric_format x -> (x <= y)%R -> (x <= round rnd' y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format y -> (Rabs x <= y)%R -> (Rabs (round rnd x) <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x y : R, generic_format y -> (Rabs x <= y)%R -> (Rabs (round rnd x) <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:Rgeneric_format y -> (Rabs x <= y)%R -> (Rabs (round rnd x) <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx, y:Rforall rnd0 : R -> Z, Valid_rnd rnd0 -> forall x0 : R, (0 <= x0)%R -> generic_format y -> (x0 <= y)%R -> (round rnd0 x0 <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expy:Rforall rnd : R -> Z, Valid_rnd rnd -> forall x : R, (0 <= x)%R -> generic_format y -> (x <= y)%R -> (round rnd x <= y)%Rapply round_le_generic... Qed. End monotone_abs.beta:radixfexp:Z -> Zvalid_exp_:Valid_expy:Rrnd':R -> ZHrnd:Valid_rnd rnd'x:RHx:(0 <= x)%Rgeneric_format y -> (x <= y)%R -> (round rnd' x <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zfloor (- x) = (- round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zfloor (- x) = (- round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zfloor (- x) = (- round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zfloor (scaled_mantissa (- x)); Fexp := cexp (- x) |} = (- F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zfloor (- scaled_mantissa x); Fexp := cexp (- x) |} = (- F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zfloor (- scaled_mantissa x); Fexp := cexp (- x) |} = F2R {| Fnum := - Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zfloor (- scaled_mantissa x); Fexp := cexp (- x) |} = F2R {| Fnum := - - Zfloor (- scaled_mantissa x); Fexp := cexp x |}now rewrite cexp_opp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zfloor (- scaled_mantissa x); Fexp := cexp (- x) |} = F2R {| Fnum := Zfloor (- scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zceil (- x) = (- round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zceil (- x) = (- round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zceil (- x) = (- round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zceil (scaled_mantissa (- x)); Fexp := cexp (- x) |} = (- F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zceil (- scaled_mantissa x); Fexp := cexp (- x) |} = (- F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zceil (- scaled_mantissa x); Fexp := cexp (- x) |} = F2R {| Fnum := - Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := - Zfloor (- - scaled_mantissa x); Fexp := cexp (- x) |} = F2R {| Fnum := - Zfloor (scaled_mantissa x); Fexp := cexp x |}now rewrite cexp_opp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := - Zfloor (scaled_mantissa x); Fexp := cexp (- x) |} = F2R {| Fnum := - Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Ztrunc (- x) = (- round Ztrunc x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Ztrunc (- x) = (- round Ztrunc x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Ztrunc (- x) = (- round Ztrunc x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Ztrunc (scaled_mantissa (- x)); Fexp := cexp (- x) |} = (- F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rapply F2R_Zopp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := - Ztrunc (scaled_mantissa x); Fexp := cexp x |} = (- F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Ztrunc (Rabs x) = Rabs (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Ztrunc (Rabs x) = Rabs (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Ztrunc (Rabs x) = Rabs (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRabs (round Ztrunc x) = round Ztrunc (Rabs x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRabs (round Ztrunc x) = round Ztrunc (if Rcase_abs x then (- x)%R else x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%RRabs (round Ztrunc x) = round Ztrunc (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Ztrunc x) = round Ztrunc xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%RRabs (round Ztrunc x) = (- round Ztrunc x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Ztrunc x) = round Ztrunc xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%R(round Ztrunc x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Ztrunc x) = round Ztrunc xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%R(round Ztrunc x <= round Ztrunc 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Ztrunc x) = round Ztrunc xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Ztrunc x) = round Ztrunc xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Ztrunc x) = round Ztrunc xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%R(0 <= round Ztrunc x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%R(round Ztrunc 0 <= round Ztrunc x)%Rnow apply Rge_le. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zaway (- x) = (- round Zaway x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zaway (- x) = (- round Zaway x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zaway (- x) = (- round Zaway x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := Zaway (scaled_mantissa (- x)); Fexp := cexp (- x) |} = (- F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |})%Rapply F2R_Zopp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RF2R {| Fnum := - Zaway (scaled_mantissa x); Fexp := cexp x |} = (- F2R {| Fnum := Zaway (scaled_mantissa x); Fexp := cexp x |})%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zaway (Rabs x) = Rabs (round Zaway x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Zaway (Rabs x) = Rabs (round Zaway x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zaway (Rabs x) = Rabs (round Zaway x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRabs (round Zaway x) = round Zaway (Rabs x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRabs (round Zaway x) = round Zaway (if Rcase_abs x then (- x)%R else x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%RRabs (round Zaway x) = round Zaway (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Zaway x) = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%RRabs (round Zaway x) = (- round Zaway x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Zaway x) = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%R(round Zaway x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Zaway x) = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%R(round Zaway x <= round Zaway 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Zaway x) = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Zaway x) = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%RRabs (round Zaway x) = round Zaway xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%R(0 <= round Zaway x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%R(round Zaway 0 <= round Zaway x)%Rnow apply Rge_le. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x >= 0)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 <= x)%R -> round Ztrunc x = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 <= x)%R -> round Ztrunc x = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%Rround Ztrunc x = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RF2R {| Fnum := if Rlt_bool (scaled_mantissa x) 0 then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(scaled_mantissa x < 0)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%RF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%R(0 <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%R(0 * bpow (- cexp x) <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}easy. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (x <= 0)%R -> round Ztrunc x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (x <= 0)%R -> round Ztrunc x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%Rround Ztrunc x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RF2R {| Fnum := if Rlt_bool (scaled_mantissa x) 0 then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%R(scaled_mantissa x < 0)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%RF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%R(scaled_mantissa x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%R(scaled_mantissa x <= 0 * bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}now rewrite Zfloor_IZR, Zceil_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zfloor 0; Fexp := cexp x |} = F2R {| Fnum := Zceil 0; Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 <= x)%R -> round Zaway x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 <= x)%R -> round Zaway x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%Rround Zaway x = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RF2R {| Fnum := if Rlt_bool (scaled_mantissa x) 0 then Zfloor (scaled_mantissa x) else Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(scaled_mantissa x < 0)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%RF2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%R(0 <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%R(0 * bpow (- cexp x) <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RH:(scaled_mantissa x < 0)%R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}easy. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (x <= 0)%R -> round Zaway x = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (x <= 0)%R -> round Zaway x = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%Rround Zaway x = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RF2R {| Fnum := if Rlt_bool (scaled_mantissa x) 0 then Zfloor (scaled_mantissa x) else Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%R(scaled_mantissa x < 0)%R -> F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%R(0 <= scaled_mantissa x)%R -> F2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%RF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%R(scaled_mantissa x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%R(scaled_mantissa x <= 0 * bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:(0 < scaled_mantissa x)%R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |} = F2R {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}now rewrite Zfloor_IZR, Zceil_IZR. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RH:0%R = scaled_mantissa xF2R {| Fnum := Zceil 0; Fexp := cexp x |} = F2R {| Fnum := Zfloor 0; Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall x : R, generic_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall x : R, generic_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%Rgeneric_format (round rnd (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zfloor (- - x)generic_format (round Zfloor (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (round Zceil (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zfloor (- - x)generic_format (- round Zceil (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (round Zceil (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zfloor (- - x)generic_format (round Zceil (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (round Zceil (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zfloor (- - x)(0 < - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (round Zceil (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (round Zceil (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (- round Zfloor (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)generic_format (round Zfloor (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x < 0)%RHr:round rnd (- - x) = round Zceil (- - x)(0 < - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format (round rnd 0)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:x = 0%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)now apply generic_format_round_pos. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZZrnd:Valid_rnd rndx:RHx:(x > 0)%Rgeneric_format (round rnd x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rgeneric_format (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(round Zfloor x <= x)%R /\ (forall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(round Zfloor x <= x)%R /\ (forall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(round Zfloor x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(round Zfloor x <= scaled_mantissa x * bpow (cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(IZR (Fnum {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) <= scaled_mantissa x * bpow (cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x) <= scaled_mantissa x * bpow (cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(0 <= bpow (cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(IZR (Zfloor (scaled_mantissa x)) <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(IZR (Zfloor (scaled_mantissa x)) <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall g : R, generic_format g -> (g <= x)%R -> (g <= round Zfloor x)%Rapply round_ge_generic... Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx, g:RHg:generic_format gHgx:(g <= x)%R(g <= round Zfloor x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expsatisfies_any generic_formatbeta:radixfexp:Z -> Zvalid_exp_:Valid_expsatisfies_any generic_format(* symmetric set *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> generic_format (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expround_pred_total (Rnd_DN_pt generic_format)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x -> generic_format (- x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expround_pred_total (Rnd_DN_pt generic_format)(* round down *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expround_pred_total (Rnd_DN_pt generic_format)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rexists f : R, Rnd_DN_pt generic_format x fapply round_DN_pt. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_DN_pt generic_format x ?fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_UP_pt generic_format (- - x) (round Zceil (- - x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_UP_pt generic_format (- - x) (- round Zfloor (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall x0 : R, generic_format x0 -> generic_format (- x0)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_DN_pt generic_format (- x) (round Zfloor (- x))apply round_DN_pt. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_DN_pt generic_format (- x) (round Zfloor (- x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_ZR_pt generic_format x (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_ZR_pt generic_format x (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_ZR_pt generic_format x (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RRnd_DN_pt generic_format x (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RRnd_UP_pt generic_format x (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(0 <= x)%RRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RRnd_UP_pt generic_format x (round Ztrunc x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RRnd_UP_pt generic_format x (round Ztrunc x)apply round_UP_pt. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= 0)%RRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> round Zfloor x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> round Zfloor x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zfloor x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zfloor x = F2R {| Fnum := 0; Fexp := cexp x |}now rewrite <- cexp_fexp_pos with (1 := Hx). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zfloor x = F2R {| Fnum := Zfloor (x * bpow (- fexp ex)); Fexp := cexp x |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, ~ generic_format x -> (round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, ~ generic_format x -> (round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format x(round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format x(round Zfloor x <= x <= round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format x(round Zfloor x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format x(x <= round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format x(x <= round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(round Zfloor x < x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(round Zfloor x < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x)%R(round Zfloor x < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x)%RHle:(x <= round Zfloor x)%RFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x)%RHle:(x <= round Zfloor x)%RH:x = round Zfloor xFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format (round Zfloor x)Hx:(round Zfloor x <= x)%RHle:(x <= round Zfloor x)%RH:x = round Zfloor xFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(round Zfloor x <= x)%RHle:(x <= round Zfloor x)%RH:x = round Zfloor xgeneric_format (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(round Zfloor x <= x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(x <= round Zceil x)%R(x < round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(x <= round Zceil x)%RHle:(round Zceil x <= x)%RFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format xHx:(x <= round Zceil x)%RHle:(round Zceil x <= x)%RH:x = round Zceil xFalsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RFx:~ generic_format (round Zceil x)Hx:(x <= round Zceil x)%RHle:(round Zceil x <= x)%RH:x = round Zceil xFalseapply generic_format_round... Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:(x <= round Zceil x)%RHle:(round Zceil x <= x)%RH:x = round Zceil xgeneric_format (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> round Zceil x = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex <= fexp ex)%Z -> round Zceil x = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zceil x = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zceil x = F2R {| Fnum := 1; Fexp := fexp ex |}now rewrite <- cexp_fexp_pos with (1 := Hx). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rex:ZHx:(bpow (ex - 1) <= x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zceil x = F2R {| Fnum := Zceil (x * bpow (- fexp ex)); Fexp := fexp ex |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, generic_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rgeneric_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x = xgeneric_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> xgeneric_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x = xgeneric_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> xgeneric_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x = xgeneric_format (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> xgeneric_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> xgeneric_format x \/ ~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> x~ generic_format xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> xH:generic_format xFalseapply round_generic... Qed. Section round_large. Variable rnd : R -> Z. Context { valid_rnd : Valid_rnd rnd }.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHx:round Zfloor x <> xH:generic_format xround Zfloor x = xbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall (x : R) (e : Z), (0 < round rnd x)%R -> (bpow e <= x)%R -> (bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall (x : R) (e : Z), (0 < round rnd x)%R -> (bpow e <= x)%R -> (bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(0 < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%RHx:(0 < x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(0 < bpow e)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%RHx:(0 < x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%RHx:(0 < x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= Rabs x < bpow ex)%RHx:(0 < x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= Rabs x < bpow ex)%RHx:(0 < x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow e <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow e <= bpow (ex - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(e <= ex - 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(e < ex)%Z -> (e <= ex - 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(e < ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(e < ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow e < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = 0%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = bpow (fexp ex)(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < 0)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = 0%R(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = bpow (fexp ex)(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = bpow (fexp ex)(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = bpow (fexp ex)(bpow (ex - 1) <= bpow (fexp ex))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(ex <= fexp ex)%ZHr:round rnd x = bpow (fexp ex)(ex - 1 <= fexp ex)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rapply (round_bounded_large_pos rnd x ex H He). Qed. End round_large.beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Re:ZHd:(0 < round rnd x)%RHex:(bpow e <= x)%Rex:ZHe:(bpow (ex - 1) <= x < bpow ex)%RHx:(0 < x)%RH:(fexp ex < ex)%Z(bpow (ex - 1) <= round rnd x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Ztrunc x <> 0%R -> mag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Ztrunc x <> 0%R -> mag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%Rmag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x = 0%Rmag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rmag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rmag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%R(bpow (mag beta x - 1) <= Rabs (round Ztrunc x) < bpow (mag beta x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= Rabs (round Ztrunc x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= Rabs (round Ztrunc x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= round Ztrunc (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= round Ztrunc (Rabs x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Ztrunc (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(0 < round Ztrunc (Rabs x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Ztrunc (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(0 < Rabs (round Ztrunc x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Ztrunc (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(bpow (ex - 1) <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Ztrunc (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Ztrunc (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Ztrunc (Rabs x) <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(round Zfloor (Rabs x) <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(0 <= Rabs x)%Rapply Rabs_pos. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Ztrunc x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(0 <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall x : R, round rnd x <> 0%R -> mag beta (round rnd x) = mag beta x \/ Rabs (round rnd x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall rnd : R -> Z, Valid_rnd rnd -> forall x : R, round rnd x <> 0%R -> mag beta (round rnd x) = mag beta x \/ Rabs (round rnd x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_exprnd:R -> ZHrnd:Valid_rnd rndx:Rround rnd x <> 0%R -> mag beta (round rnd x) = mag beta x \/ Rabs (round rnd x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Ztrunc x <> 0%R -> mag beta (round Ztrunc x) = mag beta x \/ Rabs (round Ztrunc x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zaway x <> 0%R -> mag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:round Ztrunc x <> 0%Rmag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zaway x <> 0%R -> mag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Zaway x <> 0%R -> mag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%Rmag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x = 0%Rmag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rmag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rmag beta (round Zaway x) = mag beta x \/ Rabs (round Zaway x) = bpow (Z.max (mag beta x) (fexp (mag beta x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%Rmag beta (round Zaway x) = ex \/ Rabs (round Zaway x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%Rmag beta (round Zaway x) = ex \/ Rabs (round Zaway x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%Rmag beta (Rabs (round Zaway x)) = ex \/ Rabs (round Zaway x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%Rmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(ex <= fexp ex)%Zmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%Zmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%Zmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zaway (Rabs x) = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%Zmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(ex <= fexp ex)%Zround Zceil (Rabs x) = bpow (fexp ex)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%Zmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%Zmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:(round Zaway (Rabs x) < bpow ex)%Rmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:round Zaway (Rabs x) = bpow exmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:(round Zaway (Rabs x) < bpow ex)%Rmag beta (round Zaway (Rabs x)) = exbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:round Zaway (Rabs x) = bpow exmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:(round Zaway (Rabs x) < bpow ex)%R(bpow (ex - 1) <= Rabs (round Zaway (Rabs x)) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:round Zaway (Rabs x) = bpow exmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:(round Zaway (Rabs x) < bpow ex)%R(bpow (ex - 1) <= round Zaway (Rabs x) < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:round Zaway (Rabs x) = bpow exmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:round Zaway (Rabs x) = bpow exmag beta (round Zaway (Rabs x)) = ex \/ round Zaway (Rabs x) = bpow (Z.max ex (fexp ex))now rewrite Z.max_l with (1 := Zlt_le_weak _ _ He). Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZr:round Zaway x <> 0%RZx:x <> 0%Rex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe:(fexp ex < ex)%ZH1:(bpow (ex - 1) <= round Zaway (Rabs x))%RH2:round Zaway (Rabs x) = bpow exround Zaway (Rabs x) = bpow (Z.max ex (fexp ex))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 < round Zfloor x)%R -> mag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 < round Zfloor x)%R -> mag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%Rmag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%R(0 < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%RH:(0 < x)%Rmag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%R(round Zfloor x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%RH:(0 < x)%Rmag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%RH:(0 < x)%Rmag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%R(0 < round Zfloor x)%R -> mag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%R(0 < round Ztrunc x)%R -> mag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%RHd:(0 < round Ztrunc x)%Rmag beta (round Ztrunc x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%RHd:(0 < round Ztrunc x)%Rround Ztrunc x <> 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%R(0 <= x)%Rnow apply Rlt_le. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RH:(0 < x)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 < round Zfloor x)%R -> cexp (round Zfloor x) = cexp xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 < round Zfloor x)%R -> cexp (round Zfloor x) = cexp xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%Rcexp (round Zfloor x) = cexp xnow apply mag_DN. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%Rmag beta (round Zfloor x) = mag beta xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 < round Zfloor x)%R -> scaled_mantissa (round Zfloor x) = IZR (Zfloor (scaled_mantissa x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, (0 < round Zfloor x)%R -> scaled_mantissa (round Zfloor x) = IZR (Zfloor (scaled_mantissa x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%Rscaled_mantissa (round Zfloor x) = IZR (Zfloor (scaled_mantissa x))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%R(round Zfloor x * bpow (- cexp (round Zfloor x)))%R = IZR (Zfloor (x * bpow (- cexp x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%R(round Zfloor x * bpow (- cexp x))%R = IZR (Zfloor (x * bpow (- cexp x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%R(IZR (Fnum {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) * bpow (- cexp x))%R = IZR (Zfloor (x * bpow (- cexp x)))now rewrite Rmult_assoc, <- bpow_plus, Zplus_opp_r, Rmult_1_r. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RHd:(0 < round Zfloor x)%R(IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x) * bpow (- cexp x))%R = IZR (Zfloor (x * bpow (- cexp x)))beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x f : R, Rnd_N_pt generic_format x f -> f = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x f : R, Rnd_N_pt generic_format x f -> f = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x ff = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_DN_pt generic_format x ff = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_UP_pt generic_format x ff = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_DN_pt generic_format x ff = round Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_UP_pt generic_format x ff = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_DN_pt generic_format x fRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_UP_pt generic_format x ff = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_UP_pt generic_format x ff = round Zfloor x \/ f = round Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_UP_pt generic_format x ff = round Zceil xapply round_UP_pt. Qed. Section not_FTZ. Class Exp_not_FTZ := exp_not_FTZ : forall e, (fexp (fexp e + 1) <= fexp e)%Z. Context { exp_not_FTZ_ : Exp_not_FTZ }.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx, f:RHxf:Rnd_N_pt generic_format x fH:Rnd_UP_pt generic_format x fRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZforall (e : Z) (x : R), (e <= fexp e)%Z -> generic_format x -> x = F2R {| Fnum := Ztrunc (x * bpow (- fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZforall (e : Z) (x : R), (e <= fexp e)%Z -> generic_format x -> x = F2R {| Fnum := Ztrunc (x * bpow (- fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xx = F2R {| Fnum := Ztrunc (x * bpow (- fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xx = F2R {| Fnum := Ztrunc (F2R {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |} * bpow (- fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xx = F2R {| Fnum := Ztrunc (IZR (Fnum {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Ztrunc (scaled_mantissa x); Fexp := cexp x |}) * bpow (- fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xx = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x) * bpow (- fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xx = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xIZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format x(0 <= cexp x + - fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format x(0 <= fexp (mag beta x) + - fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xex:=mag beta x:mag_prop beta x(0 <= fexp ex + - fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xex:=mag beta x:mag_prop beta x(fexp (fexp ex + 1) <= fexp ex)%Z -> (0 <= fexp ex + - fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xex:=mag beta x:mag_prop beta x((fexp ex + 1 <= fexp e)%Z -> fexp (fexp ex + 1) = fexp e) -> (fexp (fexp ex + 1) <= fexp ex)%Z -> (0 <= fexp ex + - fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e)); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (IZR (Ztrunc (scaled_mantissa x)) * IZR (beta ^ (cexp x + - fexp e))); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = F2R {| Fnum := Ztrunc (scaled_mantissa x) * beta ^ (cexp x + - fexp e); Fexp := fexp e |}beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = (IZR (Fnum {| Fnum := Ztrunc (scaled_mantissa x) * beta ^ (cexp x + - fexp e); Fexp := fexp e |}) * bpow (Fexp {| Fnum := Ztrunc (scaled_mantissa x) * beta ^ (cexp x + - fexp e); Fexp := fexp e |}))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = (IZR (Ztrunc (scaled_mantissa x) * beta ^ (cexp x + - fexp e)) * bpow (fexp e))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = (IZR (Ztrunc (scaled_mantissa x)) * IZR (beta ^ (cexp x + - fexp e)) * bpow (fexp e))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e) * bpow (fexp e))%Rnow ring_simplify (cexp x + - fexp e + fexp e)%Z. Qed. End not_FTZ. Section monotone_exp. Class Monotone_exp := monotone_exp : forall ex ey, (ex <= ey)%Z -> (fexp ex <= fexp ey)%Z. Context { monotone_exp_ : Monotone_exp }.beta:radixfexp:Z -> Zvalid_exp_:Valid_expexp_not_FTZ_:Exp_not_FTZe:Zx:RHe:(e <= fexp e)%ZHx:generic_format xH:IZR (beta ^ (cexp x + - fexp e)) = bpow (cexp x + - fexp e)x = (IZR (Ztrunc (scaled_mantissa x)) * bpow (cexp x + - fexp e + fexp e))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expExp_not_FTZbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expExp_not_FTZbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expe:Z(fexp (fexp e + 1) <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expe:ZHe:(fexp e < e)%Z(fexp (fexp e + 1) <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expe:ZHe:(e <= fexp e)%Z(fexp (fexp e + 1) <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expe:ZHe:(fexp e < e)%Z(fexp e + 1 <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expe:ZHe:(e <= fexp e)%Z(fexp (fexp e + 1) <= fexp e)%Znow apply valid_exp. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expe:ZHe:(e <= fexp e)%Z(fexp (fexp e + 1) <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expforall (x : R) (e : Z), x <> 0%R -> (Rabs x < bpow e)%R -> (cexp x <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expforall (x : R) (e : Z), x <> 0%R -> (Rabs x < bpow e)%R -> (cexp x <= fexp e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expx:Re:ZZx:x <> 0%RHx:(Rabs x < bpow e)%R(cexp x <= fexp e)%Znow apply mag_le_bpow. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expx:Re:ZZx:x <> 0%RHx:(Rabs x < bpow e)%R(mag beta x <= e)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expforall (x : R) (e : Z), (bpow (e - 1) <= Rabs x)%R -> (fexp e <= cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expforall (x : R) (e : Z), (bpow (e - 1) <= Rabs x)%R -> (fexp e <= cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expx:Re:ZHx:(bpow (e - 1) <= Rabs x)%R(fexp e <= cexp x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expx:Re:ZHx:(bpow (e - 1) <= Rabs x)%R(e <= mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expx:Re:ZHx:(bpow (e - 1) <= Rabs x)%R(Z.succ (Z.pred e) <= mag beta x)%Znow apply mag_gt_bpow. Qed. Variable rnd : R -> Z. Context { valid_rnd : Valid_rnd rnd }.beta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_expx:Re:ZHx:(bpow (e - 1) <= Rabs x)%R(Z.pred e < mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x <> 0%R -> (mag beta x <= mag beta (round rnd x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x <> 0%R -> (mag beta x <= mag beta (round rnd x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:Rround rnd x <> 0%R -> (mag beta x <= mag beta (round rnd x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Ztrunc x <> 0%R(mag beta x <= mag beta (round Ztrunc x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(mag beta x <= mag beta (round Zaway x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Ztrunc x <> 0%R(mag beta x <= mag beta x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(mag beta x <= mag beta (round Zaway x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(mag beta x <= mag beta (round Zaway x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%Rx <> 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(Rabs x <= Rabs (round Zaway x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:x = 0%Rround Zaway x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(Rabs x <= Rabs (round Zaway x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:x = 0%Rround Zaway 0 = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(Rabs x <= Rabs (round Zaway x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(Rabs x <= Rabs (round Zaway x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(Rabs x <= round Zaway (Rabs x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(Rabs x <= round Zceil (Rabs x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(0 <= Rabs x)%Rapply Rabs_pos. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round Zaway x <> 0%R(0 <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x <> 0%R -> (cexp x <= cexp (round rnd x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, round rnd x <> 0%R -> (cexp x <= cexp (round rnd x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round rnd x <> 0%R(cexp x <= cexp (round rnd x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round rnd x <> 0%R(fexp (mag beta x) <= fexp (mag beta (round rnd x)))%Znow apply mag_round_ge. Qed. End monotone_exp. Section Znearest.beta:radixfexp:Z -> Zvalid_exp_:Valid_expmonotone_exp_:Monotone_exprnd:R -> Zvalid_rnd:Valid_rnd rndx:RZr:round rnd x <> 0%R(mag beta x <= mag beta (round rnd x))%Z
Roundings to nearest: when in the middle, use the choice function
Variable choice : Z -> bool. Definition Znearest x := match Rcompare (x - IZR (Zfloor x)) (/2) with | Lt => Zfloor x | Eq => if choice (Zfloor x) then Zceil x else Zfloor x | Gt => Zceil x end.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, Znearest x = Zfloor x \/ Znearest x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, Znearest x = Zfloor x \/ Znearest x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZnearest x = Zfloor x \/ Znearest x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rmatch Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if choice (Zfloor x) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end = Zfloor x \/ match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if choice (Zfloor x) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZfloor x = Zfloor x \/ Zfloor x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(if choice (Zfloor x) then Zceil x else Zfloor x) = Zfloor x \/ (if choice (Zfloor x) then Zceil x else Zfloor x) = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZceil x = Zfloor x \/ Zceil x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(if choice (Zfloor x) then Zceil x else Zfloor x) = Zfloor x \/ (if choice (Zfloor x) then Zceil x else Zfloor x) = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZceil x = Zfloor x \/ Zceil x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZceil x = Zfloor x \/ Zceil x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZfloor x = Zfloor x \/ Zfloor x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZceil x = Zfloor x \/ Zceil x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZfloor x = Zfloor x \/ Zfloor x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZceil x = Zfloor x \/ Zceil x = Zceil xnow right. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZceil x = Zfloor x \/ Zceil x = Zceil xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (Zfloor x <= Znearest x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (Zfloor x <= Znearest x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(Zfloor x <= Znearest x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zfloor x(Zfloor x <= Zfloor x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zfloor x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zfloor x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(IZR (Zfloor x) <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(IZR (Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(x <= IZR (Zceil x))%Rapply Zceil_ub. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (Znearest x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (Znearest x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(Znearest x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zfloor x(Zfloor x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zceil x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zfloor x(IZR (Zfloor x) <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zceil x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zfloor x(IZR (Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zfloor x(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zceil x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zfloor x(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zceil x <= Zceil x)%Zapply Z.le_refl. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:Znearest x = Zceil x(Zceil x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolValid_rnd Znearestbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolValid_rnd Znearest(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x y : R, (x <= y)%R -> (Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%R(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(IZR (Zceil x) <= y)%R(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(IZR (Zceil x) <= y)%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(IZR (Zceil x) <= y)%R(Zceil x <= Zfloor y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = n(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RZfloor y = Zfloor xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(IZR (Zfloor x) <= y < IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(IZR (Zfloor x) <= y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(y < IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(IZR (Zfloor x) <= IZR (Zfloor y))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(y < IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(Zfloor x <= Zfloor y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(y < IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(y < IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(IZR (Zceil x) <= IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(Zceil x <= Zfloor x + 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(x <= IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(x < IZR (Zfloor x + 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%R(x < IZR (Zfloor x) + 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = n(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(Znearest x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor x(match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if choice (Zfloor x) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = n(* .. *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x) < / 2)%R(Zfloor x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x) < / 2)%R(Zfloor y <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = n(* .. *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= match Rcompare (y - IZR (Zfloor y)) (/ 2) with | Eq => if choice (Zfloor y) then Zceil y else Zfloor y | Lt => Zfloor y | Gt => Zceil y end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= match Rcompare (y - IZR (Zfloor x)) (/ 2) with | Eq => if choice (Zfloor x) then Zceil y else Zfloor x | Lt => Zfloor x | Gt => Zceil y end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x) < / 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zfloor x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= (if choice (Zfloor x) then Zceil y else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x) < / 2)%R(/ 2 <= y - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= (if choice (Zfloor x) then Zceil y else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x) < / 2)%R(x - IZR (Zfloor x) <= y - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= (if choice (Zfloor x) then Zceil y else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= (if choice (Zfloor x) then Zceil y else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= (if choice (Zfloor x) then Zceil x else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%Rx = ybeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%Rx = ybeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R(- IZR (Zfloor x) + x)%R = (- IZR (Zfloor x) + y)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R(x + - IZR (Zfloor x))%R = (y + - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(y - IZR (Zfloor x))%R = (/ 2)%R(x - IZR (Zfloor x))%R = (y - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R((if choice (Zfloor x) then Zceil x else Zfloor x) <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zfloor x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zfloor x <= Zceil x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(IZR (Zfloor x) <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(IZR (Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(x - IZR (Zfloor x))%R = (/ 2)%RHy:(/ 2 < y - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = n(* .. *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Znearest y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= match Rcompare (y - IZR (Zfloor y)) (/ 2) with | Eq => if choice (Zfloor y) then Zceil y else Zfloor y | Lt => Zfloor y | Gt => Zceil y end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= match Rcompare (y - IZR (Zfloor x)) (/ 2) with | Eq => if choice (Zfloor x) then Zceil y else Zfloor x | Lt => Zfloor x | Gt => Zceil y end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(Zceil x <= Zceil y)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < y - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < y - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx, y:RHxy:(x <= y)%RH:(y < IZR (Zceil x))%RHf:Zfloor y = Zfloor xHx:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zfloor x) <= y - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = n(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall n : Z, Znearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:ZZnearest (IZR n) = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Zmatch Rcompare (IZR n - IZR (Zfloor (IZR n))) (/ 2) with | Eq => if choice (Zfloor (IZR n)) then Zceil (IZR n) else Zfloor (IZR n) | Lt => Zfloor (IZR n) | Gt => Zceil (IZR n) end = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Zmatch Rcompare (IZR n - IZR n) (/ 2) with | Eq => if choice n then Zceil (IZR n) else n | Lt => n | Gt => Zceil (IZR n) end = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Zn = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Z(IZR n - IZR n < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Z(IZR n - IZR n < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Z(IZR n + - IZR n < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Z(0 < / 2)%Rnow apply IZR_lt. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> booln:Z(0 < 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (x - IZR (Zfloor x))%R <> (/ 2)%R -> (Rabs (x - IZR (Znearest x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (x - IZR (Zfloor x))%R <> (/ 2)%R -> (Rabs (x - IZR (Znearest x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if choice (Zfloor x) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x) < / 2)%R(Rabs (x - IZR (Zfloor x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (x - IZR (if choice (Zfloor x) then Zceil x else Zfloor x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(Rabs (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x) < / 2)%R(x - IZR (Zfloor x) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x) < / 2)%R(0 <= x - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (x - IZR (if choice (Zfloor x) then Zceil x else Zfloor x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(Rabs (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x) < / 2)%R(0 <= x - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (x - IZR (if choice (Zfloor x) then Zceil x else Zfloor x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(Rabs (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x) < / 2)%R(IZR (Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (x - IZR (if choice (Zfloor x) then Zceil x else Zfloor x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(Rabs (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (x - IZR (if choice (Zfloor x) then Zceil x else Zfloor x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(Rabs (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(Rabs (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(- (x - IZR (Zceil x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(IZR (Zceil x) - x < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(IZR (Zfloor x + 1) - x < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(IZR (Zfloor x) + 1 - x < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(- / 2 < - (IZR (Zfloor x) + 1 - x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(1 + - / 2 < 1 + - (IZR (Zfloor x) + 1 - x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < 1 + - (IZR (Zfloor x) + 1 - x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(IZR (Zfloor x) < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(- IZR (Zfloor x) + IZR (Zfloor x) < - IZR (Zfloor x) + x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(- IZR (Zfloor x) + IZR (Zfloor x) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < - IZR (Zfloor x) + x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < - IZR (Zfloor x) + x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(0 < 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < - IZR (Zfloor x) + x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(/ 2 < - IZR (Zfloor x) + x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x - IZR (Zceil x) <= 0)%Rapply Zceil_ub. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%RH:(/ 2 < x - IZR (Zfloor x))%R(x <= IZR (Zceil x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%R(Rabs (/ 2) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RRabs (/ 2) = (/ 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%R(0 <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%R(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%R(0 < 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Zfloor x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Zceil x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Zceil x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Zfloor x + 1)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - (IZR (Zfloor x) + 1)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (x - IZR (Zfloor x) - 1) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (/ 2 - 1) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(Rabs (1 - / 2) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%RIZR (Zfloor x) <> xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(IZR (Zfloor x) < x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(- IZR (Zfloor x) + IZR (Zfloor x) < - IZR (Zfloor x) + x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(0 < x + - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(0 < x - IZR (Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R = (/ 2)%RK:(Rabs (/ 2) <= / 2)%R(0 < 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rnow apply Znearest_N_strict. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:(x - IZR (Zfloor x))%R <> (/ 2)%R(Rabs (x - IZR (Znearest x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall (x : R) (n : Z), (Rabs (x - IZR n) < / 2)%R -> Znearest x = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall (x : R) (n : Z), (Rabs (x - IZR n) < / 2)%R -> Znearest x = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%RZnearest x = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Z.abs (Znearest x - n) < 1)%Z -> Znearest x = nbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Z.abs (Znearest x - n) < 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Z.abs (Znearest x - n) < 1)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(IZR (Z.abs (Znearest x - n)) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (IZR (Znearest x) - IZR n) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (- (x - IZR (Znearest x)) + (x - IZR n)) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (- (x - IZR (Znearest x))) + Rabs (x - IZR n) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (- (x - IZR (Znearest x))) + Rabs (x - IZR n) < 1)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (- (x - IZR (Znearest x))) + Rabs (x - IZR n) < / 2 + / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (- (x - IZR (Znearest x))) <= / 2)%Rapply Znearest_half. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rn:ZHd:(Rabs (x - IZR n) < / 2)%R(Rabs (x - IZR (Znearest x)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, Rnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, Rnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:RRnd_N_pt generic_format x (round Znearest x)(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (round Znearest x - scaled_mantissa x * bpow (cexp x)) <= Rmin (scaled_mantissa x * bpow (cexp x) - d) (u - scaled_mantissa x * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Fnum {| Fnum := Znearest (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Znearest (scaled_mantissa x); Fexp := cexp x |}) - scaled_mantissa x * bpow (cexp x)) <= Rmin (scaled_mantissa x * bpow (cexp x) - IZR (Fnum {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |})) (IZR (Fnum {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}) - scaled_mantissa x * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x)) <= Rmin (scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x)) (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) * bx - mx * bx) <= Rmin (mx * bx - IZR (Zfloor mx) * bx) (IZR (Zceil mx) * bx - mx * bx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs ((IZR (Znearest mx) - mx) * bx) <= Rmin ((mx - IZR (Zfloor mx)) * bx) ((IZR (Zceil mx) - mx) * bx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) - mx) * bx <= Rmin ((mx - IZR (Zfloor mx)) * bx) ((IZR (Zceil mx) - mx) * bx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(0 <= bx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) - mx) * bx <= Rmin ((mx - IZR (Zfloor mx)) * bx) ((IZR (Zceil mx) - mx) * bx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) - mx) * bx <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) * bx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(0 <= bx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) - mx) * bx <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) * bx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(0 <= bx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR (Znearest mx) - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):R(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)(* .. *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (IZR match Rcompare (mx - mx) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - mx) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (IZR match Rcompare (mx + - mx) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - mx) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (IZR match Rcompare 0 (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - mx) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (IZR (Zfloor mx) - mx) <= Rmin (mx - mx) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (mx - mx) <= Rmin (mx - mx) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs (mx + - mx) <= Rmin (mx + - mx) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(Rabs 0 <= Rmin 0 (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 <= Rmin 0 (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 <= (if Rle_dec 0 (IZR (Zceil mx) - mx) then 0 else IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mxH:(0 <= IZR (Zceil mx) - mx)%R(0 <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mxH:~ (0 <= IZR (Zceil mx) - mx)%R(0 <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mxH:~ (0 <= IZR (Zceil mx) - mx)%R(0 <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mxH:~ (0 <= IZR (Zceil mx) - mx)%R(mx <= IZR (Zceil mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) = mx(0 < 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)(* .. *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (/ 2) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= Rmin (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Gt => IZR (Zceil mx) - mx | _ => mx - IZR (Zfloor mx) end)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%R(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Gt => IZR (Zceil mx) - mx | _ => mx - IZR (Zfloor mx) end)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(mx - IZR (Zfloor mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(0 <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%R(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Gt => IZR (Zceil mx) - mx | _ => mx - IZR (Zfloor mx) end)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(0 <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%R(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Gt => IZR (Zceil mx) - mx | _ => mx - IZR (Zfloor mx) end)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mx(IZR (Zfloor mx) <= mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%R(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Gt => IZR (Zceil mx) - mx | _ => mx - IZR (Zfloor mx) end)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%R(Rabs (IZR match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Eq => if choice (Zfloor mx) then Zceil mx else Zfloor mx | Lt => Zfloor mx | Gt => Zceil mx end - mx) <= match Rcompare (mx - IZR (Zfloor mx)) (IZR (Zceil mx) - mx) with | Gt => IZR (Zceil mx) - mx | _ => mx - IZR (Zfloor mx) end)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx) < IZR (Zceil mx) - mx)%R(Rabs (IZR (Zfloor mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (IZR (if choice (Zfloor mx) then Zceil mx else Zfloor mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(Rabs (IZR (Zceil mx) - mx) <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (IZR (if choice (Zfloor mx) then Zceil mx else Zfloor mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(Rabs (IZR (Zceil mx) - mx) <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (IZR (Zceil mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (IZR (Zfloor mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(Rabs (IZR (Zceil mx) - mx) <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (IZR (Zfloor mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(Rabs (IZR (Zceil mx) - mx) <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(mx - IZR (Zfloor mx))%R = (IZR (Zceil mx) - mx)%R(Rabs (IZR (Zfloor mx) - mx) <= mx - IZR (Zfloor mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(Rabs (IZR (Zceil mx) - mx) <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(Rabs (IZR (Zceil mx) - mx) <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(IZR (Zceil mx) - mx <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(0 <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(0 <= IZR (Zceil mx) - mx)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RHm:IZR (Zfloor mx) <> mxH:(Rabs (mx - IZR (Zfloor mx)) <= mx - IZR (Zfloor mx))%RHm':(IZR (Zceil mx) - mx < mx - IZR (Zfloor mx))%R(mx <= IZR (Zceil mx))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_N_pt generic_format x (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%Rgeneric_format (round Znearest x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_DN_pt generic_format x dbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_UP_pt generic_format x ubeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= x - d)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RValid_rnd Znearestbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_DN_pt generic_format x dbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_UP_pt generic_format x ubeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= x - d)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_DN_pt generic_format x dbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_UP_pt generic_format x ubeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= x - d)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%RRnd_UP_pt generic_format x ubeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= x - d)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= x - d)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rmin (x - d) (u - x) <= x - d)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rabs (round Znearest x - x) <= u - x)%Rapply Rmin_r. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rd:=round Zfloor x:Ru:=round Zceil x:Rmx:=scaled_mantissa x:Rbx:=bpow (cexp x):RH:(Rabs (round Znearest x - x) <= Rmin (x - d) (u - x))%R(Rmin (x - d) (u - x) <= u - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (x - round Zfloor x)%R = (round Zceil x - x)%R -> round Znearest x = (if choice (Zfloor (scaled_mantissa x)) then round Zceil x else round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall x : R, (x - round Zfloor x)%R = (round Zceil x - x)%R -> round Znearest x = (if choice (Zfloor (scaled_mantissa x)) then round Zceil x else round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(x - round Zfloor x)%R = (round Zceil x - x)%R -> round Znearest x = (if choice (Zfloor (scaled_mantissa x)) then round Zceil x else round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(scaled_mantissa x * bpow (cexp x) - round Zfloor x)%R = (round Zceil x - scaled_mantissa x * bpow (cexp x))%R -> round Znearest x = (if choice (Zfloor (scaled_mantissa x)) then round Zceil x else round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(scaled_mantissa x * bpow (cexp x) - IZR (Fnum {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}))%R = (IZR (Fnum {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}) - scaled_mantissa x * bpow (cexp x))%R -> (IZR (Fnum {| Fnum := match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end; Fexp := cexp x |}) * bpow (Fexp {| Fnum := match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end; Fexp := cexp x |}))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Fnum {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zceil (scaled_mantissa x); Fexp := cexp x |}))%R else (IZR (Fnum {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Zfloor (scaled_mantissa x); Fexp := cexp x |}))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) = scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) = scaled_mantissa x(IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) = scaled_mantissa x(IZR match Rcompare (IZR (Zfloor (scaled_mantissa x)) - IZR (Zfloor (IZR (Zfloor (scaled_mantissa x))))) (/ 2) with | Eq => if choice (Zfloor (IZR (Zfloor (scaled_mantissa x)))) then Zceil (IZR (Zfloor (scaled_mantissa x))) else Zfloor (IZR (Zfloor (scaled_mantissa x))) | Lt => Zfloor (IZR (Zfloor (scaled_mantissa x))) | Gt => Zceil (IZR (Zfloor (scaled_mantissa x))) end * bpow (cexp x))%R = (if choice (Zfloor (IZR (Zfloor (scaled_mantissa x)))) then (IZR (Zceil (IZR (Zfloor (scaled_mantissa x)))) * bpow (cexp x))%R else (IZR (Zfloor (IZR (Zfloor (scaled_mantissa x)))) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) = scaled_mantissa x(IZR match Rcompare (IZR (Zfloor (scaled_mantissa x)) - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zfloor (scaled_mantissa x) else Zfloor (scaled_mantissa x) | _ => Zfloor (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) = scaled_mantissa xm:=Zfloor (scaled_mantissa x):Z(IZR match Rcompare (IZR m - IZR m) (/ 2) with | Eq => if choice m then m else m | _ => m end * bpow (cexp x))%R = (if choice m then (IZR m * bpow (cexp x))%R else (IZR m * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa x(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R -> (IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R(IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (/ 2) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R(IZR match Rcompare (scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) (IZR (Zceil (scaled_mantissa x)) - scaled_mantissa x) with | Eq => if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x) | Lt => Zfloor (scaled_mantissa x) | Gt => Zceil (scaled_mantissa x) end * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R(IZR (if choice (Zfloor (scaled_mantissa x)) then Zceil (scaled_mantissa x) else Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (if choice (Zfloor (scaled_mantissa x)) then (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x))%R else (IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R)beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R(scaled_mantissa x - IZR (Zfloor (scaled_mantissa x)))%R = (IZR (Zceil (scaled_mantissa x)) - scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R(scaled_mantissa x - IZR (Zfloor (scaled_mantissa x)))%R = (IZR (Zceil (scaled_mantissa x)) - scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R((scaled_mantissa x - IZR (Zfloor (scaled_mantissa x))) * bpow (cexp x))%R = ((IZR (Zceil (scaled_mantissa x)) - scaled_mantissa x) * bpow (cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%Rbpow (cexp x) <> 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%Rbpow (cexp x) <> 0%Rapply bpow_gt_0. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RFx:IZR (Zfloor (scaled_mantissa x)) <> scaled_mantissa xH:(scaled_mantissa x * bpow (cexp x) - IZR (Zfloor (scaled_mantissa x)) * bpow (cexp x))%R = (IZR (Zceil (scaled_mantissa x)) * bpow (cexp x) - scaled_mantissa x * bpow (cexp x))%R(bpow (cexp x) > 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex < fexp ex)%Z -> round Znearest x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolforall (x : R) (ex : Z), (bpow (ex - 1) <= x < bpow ex)%R -> (ex < fexp ex)%Z -> round Znearest x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Zround Znearest x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(IZR (Znearest (x * bpow (- fexp (mag beta x)))) * bpow (fexp (mag beta x)))%R = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(IZR (Znearest (x * bpow (- fexp (mag beta x)))) * bpow (fexp (mag beta x)) * bpow (- fexp (mag beta x)))%R = (0 * bpow (- fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(IZR (Znearest (x * bpow (- fexp (mag beta x)))) * bpow (fexp (mag beta x) + - fexp (mag beta x)))%R = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZIZR (Znearest (x * bpow (- fexp (mag beta x)))) = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZZnearest (x * bpow (- fexp (mag beta x))) = 0%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(Rabs (x * bpow (- fexp (mag beta x)) - 0) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(Rabs (x * bpow (- fexp (mag beta x))) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(x >= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(Rabs (x * bpow (- fexp (mag beta x))) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(x >= 0)%Rnow apply bpow_ge_0.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%Z(0 <= bpow (ex - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(Rabs (x * bpow (- fexp (mag beta x))) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(x * bpow (- fexp (mag beta x)) >= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(Rabs (x * bpow (- fexp (mag beta x))) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(x * bpow (- fexp (mag beta x)) >= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(0 <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(0 <= bpow (- fexp (mag beta x)))%Rnow apply Rge_le.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(0 <= x)%Rnow apply bpow_ge_0.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%R(0 <= bpow (- fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(Rabs (x * bpow (- fexp (mag beta x))) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(x * bpow (- fexp (mag beta x)) < / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(x * bpow (- fexp (mag beta x)) * bpow (fexp (mag beta x)) < / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(x * bpow (- fexp (mag beta x) + fexp (mag beta x)) < / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(x < / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow ex <= / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow ex <= bpow (fexp (mag beta x) - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow (fexp (mag beta x) - 1) <= / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow ex <= bpow (fexp (mag beta x) - 1))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(ex <= fexp (mag beta x) - 1)%Znow rewrite Rabs_right.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow (ex - 1) <= Rabs x < bpow ex)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow (fexp (mag beta x) - 1) <= / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow (fexp (mag beta x)) * bpow (- (1)) <= / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow (- (1)) * bpow (fexp (mag beta x)) <= / 2 * bpow (fexp (mag beta x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(bpow (- (1)) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(/ IZR (beta * 1) <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(/ IZR beta <= / 2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(2 <= IZR beta)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHex:(bpow (ex - 1) <= x < bpow ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * bpow (- fexp (mag beta x)) >= 0)%R(2 <= beta)%Znow apply Zle_bool_imp_le. Qed. End Znearest. Section rndNA. Instance valid_rnd_NA : Valid_rnd (Znearest (Zle_bool 0)) := valid_rnd_N _.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex, beta_val:Zbeta_prop:(2 <=? beta_val)%Z = trueHex:(Raux.bpow {| radix_val := beta_val; radix_prop := beta_prop |} (ex - 1) <= x < Raux.bpow {| radix_val := beta_val; radix_prop := beta_prop |} ex)%RHf:(ex < fexp ex)%ZH:(x >= 0)%RH':(x * Raux.bpow {| radix_val := beta_val; radix_prop := beta_prop |} (- fexp (mag {| radix_val := beta_val; radix_prop := beta_prop |} x)) >= 0)%R(2 <= {| radix_val := beta_val; radix_prop := beta_prop |})%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_NA_pt generic_format x (round (Znearest (Z.leb 0)) x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_NA_pt generic_format x (round (Znearest (Z.leb 0)) x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_NA_pt generic_format x (round (Znearest (Z.leb 0)) x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_N_pt generic_format x (round (Znearest (Z.leb 0)) x) -> Rnd_NA_pt generic_format x (round (Znearest (Z.leb 0)) x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRnd_N_pt generic_format x f -> Rnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fRnd_NA_pt generic_format x f(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RRnd_N_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RRnd_N_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x f(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(x <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(x <= round (Znearest (Z.leb 0)) x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(x <= (if (0 <=? Zfloor (scaled_mantissa x))%Z then round Zceil x else round Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(x <= round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= Zfloor (scaled_mantissa x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= Zfloor (scaled_mantissa x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x f(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(- x <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(- x <= - f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(round (Znearest (Z.leb 0)) x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R((if (0 <=? Zfloor (scaled_mantissa x))%Z then round Zceil x else round Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(round Zfloor x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Zfloor (scaled_mantissa x) < 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Zfloor (scaled_mantissa x) < 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(IZR (Zfloor (scaled_mantissa x)) < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(IZR (Zfloor (scaled_mantissa x)) <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0 * bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(0 < bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x f(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_NA_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rforall f2 : R, Rnd_N_pt generic_format x f2 -> (Rabs f2 <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rforall f2 : R, Rnd_N_pt generic_format x f2 -> (Rabs f2 <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x g(Rabs g <= Rabs f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x g(Rabs g <= Rabs g)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_UP_pt generic_format x (round Zceil x)apply round_UP_pt. Qed. End rndNA. Notation Znearest0 := (Znearest (fun x => (Zlt_bool x 0))). Section rndN0. Instance valid_rnd_N0 : Valid_rnd Znearest0 := valid_rnd_N _.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round (Znearest (Z.leb 0)) x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_N0_pt generic_format x (round Znearest0 x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, Rnd_N0_pt generic_format x (round Znearest0 x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_N0_pt generic_format x (round Znearest0 x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RRnd_N_pt generic_format x (round Znearest0 x) -> Rnd_N0_pt generic_format x (round Znearest0 x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRnd_N_pt generic_format x f -> Rnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fRnd_N0_pt generic_format x f(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RRnd_N_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RRnd_N_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x f(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(Rabs f <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(f <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(round Znearest0 x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R((if (Zfloor (scaled_mantissa x) <? 0)%Z then round Zceil x else round Zfloor x) <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(round Zfloor x <= x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= Zfloor (scaled_mantissa x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= Zfloor (scaled_mantissa x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%R(0 <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(0 <= x)%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x f(* . *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= Rabs x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Rabs f <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(- f <= - x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= f)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= round Znearest0 x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= (if (Zfloor (scaled_mantissa x) <? 0)%Z then round Zceil x else round Zfloor x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= round Zceil x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Zfloor (scaled_mantissa x) < 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(Zfloor (scaled_mantissa x) < 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(IZR (Zfloor (scaled_mantissa x)) < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(IZR (Zfloor (scaled_mantissa x)) <= scaled_mantissa x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(scaled_mantissa x < 0 * bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(0 < bpow (- cexp x))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(f <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%Rgeneric_format 0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R = (round Zceil x - x)%RHx:(x < 0)%R(x <= 0)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x f(* *)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N0_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%RRnd_N_pt generic_format x fbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rforall f2 : R, Rnd_N_pt generic_format x f2 -> (Rabs f <= Rabs f2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rforall f2 : R, Rnd_N_pt generic_format x f2 -> (Rabs f <= Rabs f2)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x g(Rabs f <= Rabs g)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x g(Rabs g <= Rabs g)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_DN_pt generic_format x (round Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_UP_pt generic_format x (round Zceil x)apply round_UP_pt; easy. Qed. End rndN0. Section rndN_opp.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rf:=round Znearest0 x:RRxf:Rnd_N_pt generic_format x fHm:(x - round Zfloor x)%R <> (round Zceil x - x)%Rg:RRxg:Rnd_N_pt generic_format x gRnd_UP_pt generic_format x (round Zceil x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (choice : Z -> bool) (x : R), Znearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (choice : Z -> bool) (x : R), Znearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RZnearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) = xZnearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZnearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) = xZnearest choice (- IZR (Zfloor x)) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) (IZR (Zfloor x)))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZnearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) = xZnearest choice (IZR (- Zfloor x)) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) (IZR (Zfloor x)))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZnearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZnearest choice (- x) = (- Znearest (fun t : Z => negb (choice (- (t + 1)))) x)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch Rcompare (- x - IZR (Zfloor (- x))) (/ 2) with | Eq => if choice (Zfloor (- x)) then Zceil (- x) else Zfloor (- x) | Lt => Zfloor (- x) | Gt => Zceil (- x) end = (- match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if negb (choice (- (Zfloor x + 1))) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch Rcompare (IZR (Zceil x) - x) (/ 2) with | Eq => if choice (Zfloor (- x)) then Zceil (- x) else Zfloor (- x) | Lt => Zfloor (- x) | Gt => Zceil (- x) end = (- match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if negb (choice (- (Zfloor x + 1))) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch Rcompare (IZR (Zceil x) - x) (x - IZR (Zfloor x)) with | Eq => if choice (Zfloor (- x)) then Zceil (- x) else Zfloor (- x) | Lt => Zfloor (- x) | Gt => Zceil (- x) end = (- match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if negb (choice (- (Zfloor x + 1))) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch Rcompare (IZR (Zceil x) - x) (x - IZR (Zfloor x)) with | Eq => if choice (Zfloor (- x)) then Zceil (- x) else Zfloor (- x) | Lt => Zfloor (- x) | Gt => Zceil (- x) end = (- match Rcompare (x - IZR (Zfloor x)) (IZR (Zceil x) - x) with | Eq => if negb (choice (- (Zfloor x + 1))) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch CompOpp (Rcompare (x - IZR (Zfloor x)) (IZR (Zceil x) - x)) with | Eq => if choice (Zfloor (- x)) then Zceil (- x) else Zfloor (- x) | Lt => Zfloor (- x) | Gt => Zceil (- x) end = (- match Rcompare (x - IZR (Zfloor x)) (IZR (Zceil x) - x) with | Eq => if negb (choice (- (Zfloor x + 1))) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch CompOpp (Rcompare (x - IZR (Zfloor x)) (IZR (Zceil x) - x)) with | Eq => if choice (Zfloor (- x)) then Zceil (- x) else Zfloor (- x) | Lt => Zfloor (- x) | Gt => Zceil (- x) end = (- match Rcompare (x - IZR (Zfloor x)) (IZR (Zceil x) - x) with | Eq => if negb (choice (- Zceil x)) then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch CompOpp (Rcompare (x - IZR (Zfloor x)) (IZR (- Zfloor (- x)) - x)) with | Eq => if choice (Zfloor (- x)) then (- Zfloor (- - x))%Z else Zfloor (- x) | Lt => Zfloor (- x) | Gt => (- Zfloor (- - x))%Z end = (- match Rcompare (x - IZR (Zfloor x)) (IZR (- Zfloor (- x)) - x) with | Eq => if negb (choice (- - Zfloor (- x))) then - Zfloor (- x) else Zfloor x | Lt => Zfloor x | Gt => - Zfloor (- x) end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xmatch CompOpp (Rcompare (x - IZR (Zfloor x)) (IZR (- Zfloor (- x)) - x)) with | Eq => if choice (Zfloor (- x)) then (- Zfloor x)%Z else Zfloor (- x) | Lt => Zfloor (- x) | Gt => (- Zfloor x)%Z end = (- match Rcompare (x - IZR (Zfloor x)) (IZR (- Zfloor (- x)) - x) with | Eq => if negb (choice (- - Zfloor (- x))) then - Zfloor (- x) else Zfloor x | Lt => Zfloor x | Gt => - Zfloor (- x) end)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(if choice (Zfloor (- x)) then (- Zfloor x)%Z else Zfloor (- x)) = (- (if negb (choice (- - Zfloor (- x))) then - Zfloor (- x) else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZfloor (- x) = (- - Zfloor (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(if choice (Zfloor (- x)) then (- Zfloor x)%Z else Zfloor (- x)) = (- (if negb (choice (Zfloor (- x))) then - Zfloor (- x) else Zfloor x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZfloor (- x) = (- - Zfloor (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZfloor (- x) = (- - Zfloor (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZfloor (- x) = (- - Zfloor (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> xZfloor (- x) = (- - Zfloor (- x))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (Zceil x) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(IZR (- Zfloor (- x)) - x)%R = (- x - IZR (Zfloor (- x)))%Rapply Rplus_comm. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:RHx:IZR (Zfloor x) <> x(- IZR (Zfloor (- x)) - x)%R = (- x - IZR (Zfloor (- x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (choice : Z -> bool) (x : R), round (Znearest choice) (- x) = (- round (Znearest (fun t : Z => negb (choice (- (t + 1))%Z))) x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (choice : Z -> bool) (x : R), round (Znearest choice) (- x) = (- round (Znearest (fun t : Z => negb (choice (- (t + 1))%Z))) x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rround (Znearest choice) (- x) = (- round (Znearest (fun t : Z => negb (choice (- (t + 1))%Z))) x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(IZR (Fnum {| Fnum := Znearest choice (scaled_mantissa (- x)); Fexp := cexp (- x) |}) * bpow (Fexp {| Fnum := Znearest choice (scaled_mantissa (- x)); Fexp := cexp (- x) |}))%R = (- (IZR (Fnum {| Fnum := Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x); Fexp := cexp x |}) * bpow (Fexp {| Fnum := Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x); Fexp := cexp x |})))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(IZR (Znearest choice (scaled_mantissa (- x))) * bpow (cexp (- x)))%R = (- (IZR (Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(IZR (Znearest choice (scaled_mantissa (- x))) * bpow (cexp x))%R = (- (IZR (Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(IZR (Znearest choice (- scaled_mantissa x)) * bpow (cexp x))%R = (- (IZR (Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(IZR (- Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x))%R = (- (IZR (Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x)))%Rnow rewrite Ropp_mult_distr_l_reverse. Qed.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:R(- IZR (Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x))%R = (- (IZR (Znearest (fun t : Z => negb (choice (- (t + 1))%Z)) (scaled_mantissa x)) * bpow (cexp x)))%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Znearest0 (- x) = (- round Znearest0 x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall x : R, round Znearest0 (- x) = (- round Znearest0 x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround Znearest0 (- x) = (- round Znearest0 x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:R(- round (Znearest (fun t : Z => negb (- (t + 1) <? 0)%Z)) x)%R = (- round Znearest0 x)%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rround (Znearest (fun t : Z => negb (- (t + 1) <? 0)%Z)) x = round Znearest0 xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rforall x0 : R, Znearest (fun t : Z => negb (- (t + 1) <? 0)%Z) x0 = Znearest0 x0beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RZnearest (fun t : Z => negb (- (t + 1) <? 0)%Z) x = Znearest0 xbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:Rmatch Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if negb (- (Zfloor x + 1) <? 0)%Z then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end = match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if (Zfloor x <? 0)%Z then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x endbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:Rcompare (x - IZR (Zfloor x)) (/ 2) = Eq(if negb (- (Zfloor x + 1) <? 0)%Z then Zceil x else Zfloor x) = (if (Zfloor x <? 0)%Z then Zceil x else Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%R(if negb (- (Zfloor x + 1) <? 0)%Z then Zceil x else Zfloor x) = (if (Zfloor x <? 0)%Z then Zceil x else Zfloor x)beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%Rnegb (- (Zfloor x + 1) <? 0)%Z = (Zfloor x <? 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%R(0 <=? - (Zfloor x + 1))%Z = (Zfloor x <? 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x <? 0)%Z = true(0 <=? - (Zfloor x + 1))%Z = truebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x <? 0)%Z = false(0 <=? - (Zfloor x + 1))%Z = falsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x < 0)%Z(0 <=? - (Zfloor x + 1))%Z = truebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x <? 0)%Z = false(0 <=? - (Zfloor x + 1))%Z = falsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x < 0)%Z(0 <= - (Zfloor x + 1))%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x <? 0)%Z = false(0 <=? - (Zfloor x + 1))%Z = falsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x <? 0)%Z = false(0 <=? - (Zfloor x + 1))%Z = falsebeta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <= Zfloor x)%Z(0 <=? - (Zfloor x + 1))%Z = falseomega. Qed. End rndN_opp.beta:radixfexp:Z -> Zvalid_exp_:Valid_expx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <= Zfloor x)%Z(- (Zfloor x + 1) < 0)%Zbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (choice : Z -> bool) (x : R) (ex : Z), (bpow (ex - 1) <= Rabs x < bpow ex)%R -> (ex < fexp ex)%Z -> round (Znearest choice) x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expforall (choice : Z -> bool) (x : R) (ex : Z), (bpow (ex - 1) <= Rabs x < bpow ex)%R -> (ex < fexp ex)%Z -> round (Znearest choice) x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHex:(ex < fexp ex)%Zround (Znearest choice) x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHex:(ex < fexp ex)%ZPx:(0 <= x)%Rround (Znearest choice) x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHex:(ex < fexp ex)%ZNx:(x < 0)%Rround (Znearest choice) x = 0%Rnow revert Hex; apply round_N_small_pos; revert Hx; rewrite Rabs_pos_eq.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHex:(ex < fexp ex)%ZPx:(0 <= x)%Rround (Znearest choice) x = 0%Rbeta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHex:(ex < fexp ex)%ZNx:(x < 0)%Rround (Znearest choice) x = 0%Rnow revert Hex; apply round_N_small_pos; revert Hx; rewrite Rabs_left. Qed. End Format.beta:radixfexp:Z -> Zvalid_exp_:Valid_expchoice:Z -> boolx:Rex:ZHx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHex:(ex < fexp ex)%ZNx:(x < 0)%Rround (Znearest (fun t : Z => negb (choice (- (t + 1))%Z))) (- x) = 0%R
Inclusion of a format into an extended format
Section Inclusion. Variables fexp1 fexp2 : Z -> Z. Context { valid_exp1 : Valid_exp fexp1 }. Context { valid_exp2 : Valid_exp fexp2 }.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall x : R, (x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Z) -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall x : R, (x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Z) -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xgeneric_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xgeneric_format fexp2 (F2R {| Fnum := Ztrunc (scaled_mantissa fexp1 x); Fexp := cexp fexp1 x |})beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xZtrunc (scaled_mantissa fexp1 x) <> 0%Z -> (cexp fexp2 (F2R {| Fnum := Ztrunc (scaled_mantissa fexp1 x); Fexp := cexp fexp1 x |}) <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xZx:Ztrunc (scaled_mantissa fexp1 x) <> 0%Z(cexp fexp2 (F2R {| Fnum := Ztrunc (scaled_mantissa fexp1 x); Fexp := cexp fexp1 x |}) <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xZx:Ztrunc (scaled_mantissa fexp1 x) <> 0%Z(cexp fexp2 x <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xZx:Ztrunc (scaled_mantissa fexp1 x) <> 0%Zx <> 0%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xZx:x = 0%RZtrunc (scaled_mantissa fexp1 x) = 0%Zapply Ztrunc_IZR. Qed.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2x:RHe:x <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%ZFx:generic_format fexp1 xZx:x = 0%RZtrunc 0 = 0%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e1 e2 : Z, (forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (bpow e1 <= Rabs x < bpow e2)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e1 e2 : Z, (forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (bpow e1 <= Rabs x < bpow e2)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%Rgeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%Rx <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(e1 < mag beta x <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(e1 < mag beta x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(mag beta x <= e2)%Znow apply mag_le_bpow. Qed.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(mag beta x <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e : Z, (fexp2 e <= fexp1 e)%Z -> forall x : R, (bpow (e - 1) <= Rabs x <= bpow e)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e : Z, (fexp2 e <= fexp1 e)%Z -> forall x : R, (bpow (e - 1) <= Rabs x <= bpow e)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:(Rabs x < bpow e)%Rgeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow egeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:(Rabs x < bpow e)%Rx <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow egeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow egeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 xgeneric_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 xgeneric_format fexp2 (Rabs x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 xgeneric_format fexp2 (bpow e)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 x(fexp2 e <= e)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 x(fexp1 e <= e)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 xgeneric_format fexp1 (bpow e)now apply generic_format_abs. Qed.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e:ZHe:(fexp2 e <= fexp1 e)%Zx:RHx1:(bpow (e - 1) <= Rabs x)%RHx2:Rabs x = bpow eFx:generic_format fexp1 xgeneric_format fexp1 (Rabs x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e1 e2 : Z, (e1 < e2)%Z -> (forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (bpow e1 <= Rabs x <= bpow e2)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e1 e2 : Z, (e1 < e2)%Z -> (forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (bpow e1 <= Rabs x <= bpow e2)%R -> generic_format fexp1 x -> generic_format fexp2 x(* *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%Rgeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%Rx <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(e1 < mag beta x <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(e1 < mag beta x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(mag beta x <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:(Rabs x < bpow e2)%RZx:x <> 0%R(mag beta x <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 x(* *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(fexp2 e2 <= fexp1 e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(e1 < e2 <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(e1 < e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(e2 <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(e2 <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= bpow e2 <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow (e2 - 1) <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow e2 <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(e2 - 1 <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow e2 <= bpow e2)%Rapply Rle_refl. Qed.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1, e2:ZHe':(e1 < e2)%ZHe:forall e : Z, (e1 < e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx1:(bpow e1 <= Rabs x)%RHx2:Rabs x = bpow e2(bpow e2 <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e2 : Z, (forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (Rabs x <= bpow e2)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e2 : Z, (forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (Rabs x <= bpow e2)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(Rabs x < bpow e2)%Rgeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(Rabs x < bpow e2)%Rx <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(Rabs x < bpow e2)%RZx:x <> 0%R(fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(Rabs x < bpow e2)%RZx:x <> 0%R(mag beta x <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(fexp2 e2 <= fexp1 e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(e2 <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow (e2 - 1) <= Rabs x <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow (e2 - 1) <= bpow e2 <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow (e2 - 1) <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow e2 <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(e2 - 1 <= e2)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow e2 <= bpow e2)%Rapply Rle_refl. Qed.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e2:ZHe:forall e : Z, (e <= e2)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:Rabs x = bpow e2(bpow e2 <= bpow e2)%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e1 : Z, (forall e : Z, (e1 < e)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (bpow e1 <= Rabs x)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall e1 : Z, (forall e : Z, (e1 < e)%Z -> (fexp2 e <= fexp1 e)%Z) -> forall x : R, (bpow e1 <= Rabs x)%R -> generic_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1:ZHe:forall e : Z, (e1 < e)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(bpow e1 <= Rabs x)%Rgeneric_format fexp1 x -> generic_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1:ZHe:forall e : Z, (e1 < e)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(bpow e1 <= Rabs x)%Rx <> 0%R -> (fexp2 (mag beta x) <= fexp1 (mag beta x))%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1:ZHe:forall e : Z, (e1 < e)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(bpow e1 <= Rabs x)%RZx:x <> 0%R(fexp2 (mag beta x) <= fexp1 (mag beta x))%Znow apply mag_gt_bpow. Qed. Variable rnd : R -> Z. Context { valid_rnd : Valid_rnd rnd }.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2e1:ZHe:forall e : Z, (e1 < e)%Z -> (fexp2 e <= fexp1 e)%Zx:RHx:(bpow e1 <= Rabs x)%RZx:x <> 0%R(e1 < mag beta x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, generic_format fexp1 x -> generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndforall x : R, generic_format fexp1 x -> generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RGx:generic_format fexp1 xgeneric_format fexp1 (Rabs (round fexp2 rnd x))beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RGx:generic_format fexp1 (Rabs x)generic_format fexp1 (Rabs (round fexp2 rnd x))beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall rnd : R -> Z, Valid_rnd rnd -> forall x : R, generic_format fexp1 (Rabs x) -> generic_format fexp1 (Rabs (round fexp2 rnd x))beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2forall rnd : R -> Z, Valid_rnd rnd -> forall x : R, (0 <= x)%R -> generic_format fexp1 x -> generic_format fexp1 (round fexp2 rnd x)(* x > 0 *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 x(cexp fexp1 x < mag beta x)%Z -> generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 x(fexp1 (mag beta x) < mag beta x)%Z -> generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:x <> 0%R -> (bpow (ex - 1) <= Rabs x < bpow ex)%R(fexp1 ex < ex)%Z -> generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%R(fexp1 ex < ex)%Z -> generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= Rabs x < bpow ex)%RHe':(fexp1 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)(* - x near 0 for fexp2 *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = 0%Rgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = bpow (fexp2 ex)generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = 0%Rgeneric_format fexp1 0beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = bpow (fexp2 ex)generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = bpow (fexp2 ex)generic_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = bpow (fexp2 ex)generic_format fexp1 (bpow (fexp2 ex))beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = bpow (fexp2 ex)(fexp1 (fexp2 ex) <= fexp2 ex)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(ex <= fexp2 ex)%ZHr:round fexp2 rnd x = bpow (fexp2 ex)(fexp1 (fexp2 ex) < fexp2 ex)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)(* - x large for fexp2 *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)(* - - round fexp2 x is representable for fexp1 *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%Zgeneric_format fexp2 xbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%Zgeneric_format fexp2 (F2R {| Fnum := Ztrunc (scaled_mantissa fexp1 x); Fexp := cexp fexp1 x |})beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%ZZtrunc (scaled_mantissa fexp1 x) <> 0%Z -> (cexp fexp2 (F2R {| Fnum := Ztrunc (scaled_mantissa fexp1 x); Fexp := cexp fexp1 x |}) <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%ZZtrunc (scaled_mantissa fexp1 x) <> 0%Z -> (cexp fexp2 (round fexp1 Ztrunc x) <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%ZZx:Ztrunc (scaled_mantissa fexp1 x) <> 0%Z(cexp fexp2 (round fexp1 Ztrunc x) <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%ZZx:Ztrunc (scaled_mantissa fexp1 x) <> 0%Z(fexp2 (mag beta (round fexp1 Ztrunc x)) <= cexp fexp1 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%ZZx:Ztrunc (scaled_mantissa fexp1 x) <> 0%Zround fexp1 Ztrunc x <> 0%Rbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp2 x <= cexp fexp1 x)%ZZx:round fexp1 Ztrunc x = 0%RZtrunc (scaled_mantissa fexp1 x) = 0%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)(* - - round fexp2 x has too many digits for fexp1 *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%Zgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%Rgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%Rrnd (scaled_mantissa fexp2 x) <> 0%Z -> (cexp fexp1 (F2R {| Fnum := rnd (scaled_mantissa fexp2 x); Fexp := cexp fexp2 x |}) <= cexp fexp2 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%RZx:rnd (scaled_mantissa fexp2 x) <> 0%Z(cexp fexp1 (F2R {| Fnum := rnd (scaled_mantissa fexp2 x); Fexp := cexp fexp2 x |}) <= cexp fexp2 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%RZx:rnd (scaled_mantissa fexp2 x) <> 0%Z(cexp fexp1 (round fexp2 rnd x) <= cexp fexp2 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%RZx:rnd (scaled_mantissa fexp2 x) <> 0%Z(fexp1 (mag beta (round fexp2 rnd x)) <= cexp fexp2 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%RZx:rnd (scaled_mantissa fexp2 x) <> 0%Z(fexp1 ex <= cexp fexp2 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:(round fexp2 rnd x < bpow ex)%RZx:rnd (scaled_mantissa fexp2 x) <> 0%Z(fexp1 (mag beta x) <= cexp fexp2 x)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow exgeneric_format fexp1 (bpow ex)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:(0 < x)%RGx:generic_format fexp1 xex:ZEx:(bpow (ex - 1) <= x < bpow ex)%RHe':(fexp1 ex < ex)%ZHe:(fexp2 ex < ex)%ZHe'':(cexp fexp1 x < cexp fexp2 x)%ZHr1:(bpow (ex - 1) <= round fexp2 rnd x)%RHr2:round fexp2 rnd x = bpow ex(fexp1 ex <= ex)%Zbeta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)(* x = 0 *)beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 (round fexp2 rnd x)apply generic_format_0. Qed. End Inclusion. End Generic. Notation ZnearestA := (Znearest (Zle_bool 0)). Section rndNA_opp.beta:radixfexp1, fexp2:Z -> Zvalid_exp1:Valid_exp fexp1valid_exp2:Valid_exp fexp2rnd:R -> Zvalid_rnd:Valid_rnd rndx:RHx:0%R = xGx:generic_format fexp1 xgeneric_format fexp1 0forall (beta : radix) (fexp : Z -> Z) (x : R), round beta fexp ZnearestA (- x) = (- round beta fexp ZnearestA x)%Rforall (beta : radix) (fexp : Z -> Z) (x : R), round beta fexp ZnearestA (- x) = (- round beta fexp ZnearestA x)%Rbeta:radixfexp:Z -> Zx:Rround beta fexp ZnearestA (- x) = (- round beta fexp ZnearestA x)%Rbeta:radixfexp:Z -> Zx:R(- round beta fexp (Znearest (fun t : Z => negb (0 <=? - (t + 1))%Z)) x)%R = (- round beta fexp ZnearestA x)%Rbeta:radixfexp:Z -> Zx:Rround beta fexp (Znearest (fun t : Z => negb (0 <=? - (t + 1))%Z)) x = round beta fexp ZnearestA xbeta:radixfexp:Z -> Zx:Rforall x0 : R, Znearest (fun t : Z => negb (0 <=? - (t + 1))%Z) x0 = ZnearestA x0beta:radixfexp:Z -> Zx:RZnearest (fun t : Z => negb (0 <=? - (t + 1))%Z) x = ZnearestA xbeta:radixfexp:Z -> Zx:Rmatch Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if negb (0 <=? - (Zfloor x + 1))%Z then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x end = match Rcompare (x - IZR (Zfloor x)) (/ 2) with | Eq => if (0 <=? Zfloor x)%Z then Zceil x else Zfloor x | Lt => Zfloor x | Gt => Zceil x endbeta:radixfexp:Z -> Zx:RC:Rcompare (x - IZR (Zfloor x)) (/ 2) = Eq(if negb (0 <=? - (Zfloor x + 1))%Z then Zceil x else Zfloor x) = (if (0 <=? Zfloor x)%Z then Zceil x else Zfloor x)beta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%R(if negb (0 <=? - (Zfloor x + 1))%Z then Zceil x else Zfloor x) = (if (0 <=? Zfloor x)%Z then Zceil x else Zfloor x)beta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%Rnegb (0 <=? - (Zfloor x + 1))%Z = (0 <=? Zfloor x)%Zbeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%R(- (Zfloor x + 1) <? 0)%Z = (0 <=? Zfloor x)%Zbeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <=? Zfloor x)%Z = true(- (Zfloor x + 1) <? 0)%Z = truebeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <=? Zfloor x)%Z = false(- (Zfloor x + 1) <? 0)%Z = falsebeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <=? Zfloor x)%Z = true(- (Zfloor x + 1) <? 0)%Z = truebeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <= Zfloor x)%Z(- (Zfloor x + 1) <? 0)%Z = trueomega.beta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <= Zfloor x)%Z(- (Zfloor x + 1) < 0)%Zbeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(0 <=? Zfloor x)%Z = false(- (Zfloor x + 1) <? 0)%Z = falsebeta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x < 0)%Z(- (Zfloor x + 1) <? 0)%Z = falseomega. Qed. End rndNA_opp.beta:radixfexp:Z -> Zx:RC:(x - IZR (Zfloor x))%R = (/ 2)%RC':(Zfloor x < 0)%Z(0 <= - (Zfloor x + 1))%Z
Notations for backward-compatibility with Flocq 1.4.
Notation rndDN := Zfloor (only parsing). Notation rndUP := Zceil (only parsing). Notation rndZR := Ztrunc (only parsing). Notation rndNA := ZnearestA (only parsing).