proposition: Lemma Rnearbyint_error_ZR_neg x : (x <= 0 -> 0 <= Rnearbyint rnd_ZR x - x <= 1)%R.
proof: Proof. simpl; unfold Ztrunc. case Rlt_bool_spec; try lra. intros; apply Rnearbyint_error_UP. intros H H0. assert (H1 : x = 0%R) by lra. assert (H2 := Zfloor_IZR 0); simpl in H2. rewrite H1, H2; simpl; lra. Qed.
imports: Coq(Reals ZArith Psatz) Flocq(Core) Xreal