Section RND_FLX.
Variable beta : radix.
Notation bpow e := (bpow beta e).
Variable prec : Z.
Class Prec_gt_0 :=
prec_gt_0 : (0 < prec)%Z.
Context { prec_gt_0_ : Prec_gt_0 }.
Inductive FLX_format (x : R) : Prop :=
FLX_spec (f : float beta) :
x = F2R f -> (Z.abs (Fnum f) < Zpower beta prec)%Z -> FLX_format x.
Definition FLX_exp (e : Z) := (e - prec)%Z.
(** Properties of the FLX format *)
Global Instance FLX_exp_valid : Valid_exp FLX_exp.
Proof with auto with typeclass_instances.
intros x e Hx Fx.
apply FLX_format_generic.
apply generic_format_FIX in Fx.
revert Fx.
apply generic_inclusion with (e := e)...
apply Z.le_refl.
Qed.
(** unbounded floating-point format with normal mantissas *)
Inductive FLXN_format (x : R) : Prop :=
FLXN_spec (f : float beta) :
x = F2R f ->
(x <> 0%R -> Zpower beta (prec - 1) <= Z.abs (Fnum f) < Zpower beta prec)%Z ->
FLXN_format x.

Theorem generic_format_FLX_1 :
generic_format beta FLX_exp 1.