fact: Definition nearbyint (m : rounding_mode) (u : U) (X : I.type) (t : T) : T := let e := eval u t X X in let e1 := I.nearbyint m e in if Iconst e1 then Const (I.bnd (I.lower e1) (I.lower e1)) else let (p, i) := match m with | rnd_UP => let vm1 := I.lower im1 in let v1 := I.upper i1 in let i := I.bnd vm1 v1 in (I.div u.1 i1 i2, I.div u.1 i i2) | rnd_DN => let vm1 := I.lower im1 in let v1 := I.upper i1 in let i := I.bnd vm1 v1 in (I.div u.1 im1 i2, I.div u.1 i i2) | rnd_ZR => match I.sign_large e with | Xlt => let vm1 := I.lower im1 in let v1 := I.upper i1 in let i := I.bnd vm1 v1 in (I.div u.1 i1 i2, I.div u.1 i i2) | Xund => let vm1 := I.lower im1 in let v1 := I.upper i1 in (I.zero, I.bnd vm1 v1) | _ => let vm1 := I.lower im1 in let v1 := I.upper i1 in let i := I.bnd vm1 v1 in (I.div u.1 im1 i2, I.div u.1 i i2) end | rnd_NE => let vm1 := I.lower im1 in let v1 := I.upper i1 in let i := I.bnd vm1 v1 in (I.zero, I.div u.1 i i2) end in add u X t (Tm {|approx := Pol.polyC p; error := I.mask i e1 |}).
imports: Coq(Reals ZArith Psatz) mathcomp.ssreflect(ssreflect ssrbool ssrfun eqtype ssrnat seq bigop) Interval Xreal Basic Interval_compl Datatypes Taylor_model_sharp Bound Bound_quad Univariate_sig