Definition Fnormalize (p : float) :=
  match Z_zerop (Fnum p) with
  | left _ => Float 0 (- dExp b)
  | right _ =>
      Fshift radix
        (min (precision - Fdigit radix p) (Zabs_nat (dExp b + Fexp p))) p
  end.

(* Specifications: *)
Theorem FnormalizeCorrect : forall p : float, Fnormalize p = p :>R.
Theorem Fnormalize_Fopp : forall p : float, Fnormalize (Fopp p) = Fopp (Fnormalize p).
Theorem FnormalizeBounded : forall p : float, Fbounded b p -> Fbounded b (Fnormalize p).
Theorem FnormalizeCanonic : forall p : float, Fbounded b p -> Fcanonic (Fnormalize p).
Theorem NormalAndSubNormalNotEq : forall p q : float, Fnormal p -> Fsubnormal q -> p <> q :>R.
Theorem FcanonicUnique : forall p q : float, Fcanonic p -> Fcanonic q -> p = q :>R -> p = q.
Theorem FcanonicLeastExp : forall x y : float, x = y :>R -> Fbounded b x -> Fcanonic y -> (Fexp y <= Fexp x)%Z.
Theorem FcanonicLtPos : forall p q : float, Fcanonic p -> Fcanonic q -> (0 <= p)%R -> (p < q)%R -> (Fexp p < Fexp q)%Z \/ Fexp p = Fexp q /\ (Fnum p < Fnum q)%Z.
Theorem FcanonicLePos : forall p q : float, Fcanonic p -> Fcanonic q -> (0 <= p)%R -> (p <= q)%R -> (Fexp p < Fexp q)%Z \/ Fexp p = Fexp q /\ (Fnum p <= Fnum q)%Z.
Theorem Fcanonic_Rle_Zle : forall x y : float, Fcanonic x -> Fcanonic y -> (Rabs x <= Rabs y)%R -> (Fexp x <= Fexp y)%Z.
Theorem FcanonicLtNeg : forall p q : float, Fcanonic p -> Fcanonic q -> (q <= 0)%R -> (p < q)%R -> (Fexp q < Fexp p)%Z \/ Fexp p = Fexp q /\ (Fnum p < Fnum q)%Z.
Theorem FcanonicFnormalizeEq : forall p : float, Fcanonic p -> Fnormalize p = p.
Theorem FcanonicPosFexpRlt : forall x y : float, (0 <= x)%R -> (0 <= y)%R -> Fcanonic x -> Fcanonic y -> (Fexp x < Fexp y)%Z -> (x < y)%R.
Theorem FcanonicNegFexpRlt : forall x y : float, (x <= 0)%R -> (y <= 0)%R -> Fcanonic x -> Fcanonic y -> (Fexp x < Fexp y)%Z -> (y < x)%R.
Theorem FnormalBoundAbs2 : forall p : float, Fnormal p -> (Zpos (vNum b) * Float 1%nat (Zpred (Fexp p)) <= Fabs p)%R.
Theorem vNumbMoreThanOne : (1 < Zpos (vNum b))%Z.
Theorem PosNormMin : Zpos (vNum b) = (radix * nNormMin)%Z.
Theorem FnormalPpred : forall x : Z, (- dExp b <= x)%Z -> Fnormal (Float (pPred (vNum b)) x).
Theorem FcanonicPpred : forall x : Z, (- dExp b <= x)%Z -> Fcanonic (Float (pPred (vNum b)) x).
Theorem FnormalNnormMin : forall x : Z, (- dExp b <= x)%Z -> Fnormal (Float nNormMin x).
Theorem FcanonicNnormMin : forall x : Z, (- dExp b <= x)%Z -> Fcanonic (Float nNormMin x).
Theorem boundedNorMinGivesExp : forall (x : Z) (p : float), Fbounded b p -> (- dExp b <= x)%Z -> (Float nNormMin x <= p)%R -> (p <= Float (pPred (vNum b)) x)%R -> Fexp (Fnormalize p) = x.