NLA-lib Explorer

NLAlib.Ops.IsSumErr.pairwise

Library · theorem

Standard rounding

One step of pairwise summation: the rounded sum of the sums of the two halves.

NLAlib.Ops.IsSumErr.pairwise {K : Type} [Inhabited K] {u : ℝ} {dec : K → ℝ} {M : Ops.Machine K}
  (hM : Ops.StdModel u dec M) (hu : 0 ≤ u) {n : ℕ} (hn : 2 ≤ n) {xs : List K} {v₁ v₂ : K}
  (h1 :
    Ops.IsSumErr dec ((1 + u) ^ Nat.clog 2 (n / 2) - 1) (n / 2) (Ops.vec (List.take (n / 2) xs)) v₁)
  (h2 :
    Ops.IsSumErr dec ((1 + u) ^ Nat.clog 2 (n - n / 2) - 1) (n - n / 2)
      (Ops.vec (List.drop (n / 2) xs)) v₂) :
  Ops.IsSumErr dec ((1 + u) ^ Nat.clog 2 n - 1) n (Ops.vec xs) (M.add v₁ v₂)

Full source on GitHub

Import NLAlib.Ops.Blas.Sum.