(** Normalization and rounding *)

Definition shl_align mx ex ex' :=
  match (ex' - ex)%Z with
  | Zneg d => (shift_pos d mx, ex')
  | _ => (mx, ex)
  end.

Theorem snd_shl_align : forall mx ex ex', (ex' <= ex)%Z -> snd (shl_align mx ex ex') = ex'.