NLA-lib Explorer

NLAlib.Computation.AbsRelErr.abs_add_sub_le

Library · theorem

Mixed multiplication and addition errors compose with independent precision and absolute allowances. If q approximates a and z approximates \mathbf{b}+q, the returned value differs from \mathbf{b}+a by at most u_a\lvert b\rvert+(u_m+u_a+u_m u_a)\lvert a\rvert+ (1+u_a)\eta_m+\eta_a. Only the addition allowance must be nonnegative.

NLAlib.Computation.AbsRelErr.abs_add_sub_le {a b q z um ua ηm ηa : ℝ}
  (hm : Computation.AbsRelErr um ηm a q) (ha : Computation.AbsRelErr ua ηa (b + q) z)
  (hua : 0 ≤ ua) : |b + a - z| ≤ ua * |b| + (um + ua + um * ua) * |a| + (1 + ua) * ηm + ηa

Full source on GitHub

Import NLAlib.Ops.ArithmeticError.