(** the most useful one: R -> F *)
Definition round x :=
F2R (Float beta (rnd (scaled_mantissa x)) (canonic_exp x)).

(* Specifications: *)
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.
Theorem round_bounded_small_pos :
forall x ex,
(ex <= fexp ex)%Z ->
(bpow (ex - 1) <= x < bpow ex)%R ->
round x = 0%R \/ round x = bpow (fexp ex).
Theorem round_le_pos :
forall x y, (0 < x)%R -> (x <= y)%R -> (round x <= round y)%R.
Theorem round_generic :
forall x,
generic_format x ->
round x = x.
Theorem round_0 :
round 0 = 0%R.
Theorem exp_small_round_0_pos :
forall x ex,
(bpow (ex - 1) <= x < bpow ex)%R ->
round x = 0%R -> (ex <= fexp ex)%Z .
Theorem generic_format_round_pos :
forall x,
(0 < x)%R ->
generic_format (round x).