(** Relates location and rounding toward zero. *)

Definition round_ZR (s : bool) l :=
  match l with
  | loc_Exact => false
  | _ => s
  end.

(* Specifications: *)
Theorem inbetween_int_ZR : forall x m l, inbetween_int m x l -> Ztrunc x = cond_incr (round_ZR (Zlt_bool m 0) l) m.
Theorem inbetween_float_ZR : forall x m l, let e := canonic_exp beta fexp x in inbetween_float beta m e x l -> round beta fexp Ztrunc x = F2R (Float beta (cond_incr (round_ZR (Zlt_bool m 0) l) m) e).
Theorem inbetween_int_ZR_sign : forall x m l, inbetween_int m (Rabs x) l -> Ztrunc x = cond_Zopp (Rlt_bool x 0) m.
Theorem inbetween_float_ZR_sign : forall x m l, let e := canonic_exp beta fexp x in inbetween_float beta m e (Rabs x) l -> round beta fexp Ztrunc x = F2R (Float beta (cond_Zopp (Rlt_bool x 0) m) e).