NLA-lib Explorer

NLAlib.Ops.StdModel.abs_sum_mul_sub_sumWord_le

Library · theorem

Standard rounding

The exact dot product minus the actual streamed scalar word is bounded by ((1+u)^{2n}-1)\sum_{j<n}\lvert \mathbf{x}_j y_j\rvert for nonnegative unit roundoff u. The bound counts every multiplication and addition, including addition to initial zero. [Higham2002, §2.2 and §3.1]; conservative without a smallness assumption.

NLAlib.Ops.StdModel.abs_sum_mul_sub_sumWord_le {K : Type} {u : ℝ} {dec : K → ℝ} {M : Ops.Machine K}
  (hM : Ops.StdModel u dec M) (hu : 0 ≤ u) (xs ys : ℕ → K) (n : ℕ) :
  |∑ j ∈ Finset.range n, dec (xs j) * dec (ys j) - dec (Ops.ScalarProducts.sumWord M xs ys n)| ≤
    Ops.ScalarProducts.roundoff u n * ∑ j ∈ Finset.range n, |dec (xs j) * dec (ys j)|

Full source on GitHub

Import NLAlib.Ops.Blas.ScalarProductsRounded.