NLA-lib Explorer

NLAlib.Ops.MixedModel.abs_add_mul_sub_le

Library · theorem

Two rounded operations with gradual underflow. The second range guard uses the computed product. Merely bounding the final ideal sum does not imply this guard. [Higham2002, §2.2].

NLAlib.Ops.MixedModel.abs_add_mul_sub_le {K : Type} {u eta : ℝ} {dec : K → ℝ} {M : Ops.Machine K}
  {safe : ℝ → Prop} (hM : Ops.MixedModel u eta dec M safe) (a x y : K) (hmul : safe (dec a * dec x))
  (hadd : safe (dec y + dec (M.mul a x))) :
  |dec (M.add y (M.mul a x)) - (dec y + dec a * dec x)| ≤
    ((1 + u) ^ 2 - 1) * (|dec y| + |dec a * dec x|) + (2 + u) * eta

Full source on GitHub

Import NLAlib.Ops.Catalog.Scalar.