Notation bpow e := (bpow beta e).Notation format := (generic_format beta (FLT_exp emin prec)).Notation cexp := (canonic_exp beta (FLT_exp emin prec)).

(* Specifications: *)
Lemma mult_error_FLX_aux: forall x y, format x -> format y -> (round beta (FLX_exp prec) rnd (x * y) - (x * y) <> 0)%R -> exists f:float beta, (F2R f = round beta (FLX_exp prec) rnd (x * y) - (x * y))%R /\ (canonic_exp beta (FLX_exp prec) (F2R f) <= Fexp f)%Z /\ (Fexp f = cexp x + cexp y)%Z.
Theorem mult_error_FLX : forall x y, format x -> format y -> format (round beta (FLX_exp prec) rnd (x * y) - (x * y))%R.
Theorem mult_error_FLT : forall x y, format x -> format y -> (x*y = 0)%R \/ (bpow (emin + 2*prec - 1) <= Rabs (x * y))%R -> format (round beta (FLT_exp emin prec) rnd (x * y) - (x * y))%R.
Lemma mult_error_FLX_aux: forall x y, format x -> format y -> (round beta (FLX_exp prec) rnd (x * y) - (x * y) <> 0)%R -> exists f:float beta, (F2R f = round beta (FLX_exp prec) rnd (x * y) - (x * y))%R /\ (canonic_exp beta (FLX_exp prec) (F2R f) <= Fexp f)%Z /\ (Fexp f = cexp x + cexp y)%Z.
Theorem mult_error_FLX : forall x y, format x -> format y -> format (round beta (FLX_exp prec) rnd (x * y) - (x * y))%R.
Theorem mult_error_FLT : forall x y, format x -> format y -> (x*y = 0)%R \/ (bpow (emin + 2*prec - 1) <= Rabs (x * y))%R -> format (round beta (FLT_exp emin prec) rnd (x * y) - (x * y))%R.