NLA-lib Explorer

NLAlib.Ops.Examples.Routines.sum_satisfies

Library · theorem

Standard rounding

Sequential summation satisfies the contract of the operation sum with the error (1 + u) ^ (n - 1) - 1, as a consequence of the judgment of the routine.

NLAlib.Ops.Examples.Routines.sum_satisfies {K Op Tst : Type} [Inhabited K] [Ops.Has Ops.ScalarOp Op]
  {M : Ops.Machine K} {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {u : ℝ} {dec : K → ℝ}
  (hM : Ops.StdModel u dec M) (hu : 0 ≤ u) (ok : ℕ → Prop) :
  Ops.Examples.Routines.sum.impl.Satisfies I Ops.Mode.total
    ((Ops.sumRel dec fun n ↦ (1 + u) ^ (n - 1) - 1).spec (Ops.OutApart ok))

Full source on GitHub

Import NLAlib.Ops.Examples.RoutineLink.