(** Relates location and rounding to nearest. *)

Definition round_N (p : bool) l :=
  match l with
  | loc_Exact => false
  | loc_Inexact Lt => false
  | loc_Inexact Eq => p
  | loc_Inexact Gt => true
  end.

Theorem inbetween_int_NA_sign : forall x m l, inbetween_int m (Rabs x) l -> ZnearestA x = cond_Zopp (Rlt_bool x 0) (cond_incr (round_N true l) m).