(** Conversion from an integer.  Round to nearest. *)

Definition BofZ (n: Z) : binary_float :=
  binary_normalize prec emax prec_gt_0_ Hmax mode_NE n 0 false.

Theorem BofZ_mult_2p: forall nan x p, Z.abs x <= 2^emax - 2^(emax-prec) -> 2^prec <= Z.abs x -> 0 <= p <= emax - 1 -> Bmult _ _ _ Hmax nan mode_NE (BofZ x) (BofZ (2^p)) = BofZ (x * 2^p).