Section Fcore_generic_round_pos.
(** 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 }.
(** the most useful one: R -> F *)
Definition round x :=
F2R (Float beta (rnd (scaled_mantissa x)) (cexp x)).

Theorem round_bounded_large_pos :
forall x ex,
(fexp ex < ex)%Z ->
(bpow (ex - 1) <= x < bpow ex)%R ->
(bpow (ex - 1) <= round x <= bpow ex)%R.