NLA-lib Explorer

Float.Model.UnpackedFloat.abs_toReal_mul_finite_sub_le

Library · theorem

Multiplying two finite values, not necessarily canonical, when the exponent of the product is low enough.

Float.Model.UnpackedFloat.abs_toReal_mul_finite_sub_le {spec : Float.Model.Format} (m₁ m₂ : ℕ)
  (e₁ e₂ : ℤ) (s₁ s₂ : Float.Model.UnpackedFloat.Sign) (hm₁ : 0 < m₁) (hm₂ : 0 < m₂)
  (he : e₁ + e₂ ≤ spec.targetExponent (Float.Model.totalExponent (m₁ * m₂) (e₁ + e₂))) :
  |(Float.Model.UnpackedFloat.mul spec (Float.Model.UnpackedFloat.finite s₁ m₁ e₁ hm₁)
            (Float.Model.UnpackedFloat.finite s₂ m₂ e₂ hm₂)).toReal -
        (Float.Model.UnpackedFloat.finite s₁ m₁ e₁ hm₁).toReal *
          (Float.Model.UnpackedFloat.finite s₂ m₂ e₂ hm₂).toReal| ≤
    spec.unitRoundoff *
        |(Float.Model.UnpackedFloat.finite s₁ m₁ e₁ hm₁).toReal *
            (Float.Model.UnpackedFloat.finite s₂ m₂ e₂ hm₂).toReal| +
      spec.underflowBound

Full source on GitHub

Import NLAlib.ForMathlib.Data.Float.Operations.