NLAlib.Computation.absRelErr_binaryFloatRound
Library · theorem
Rounding with precision p and smallest subnormal spacing 2^{e_{\min}} has error at most 2^{-p}\lvert \mathbf{x}\rvert+2^{e_{\min}}/2. The selector may choose either neighbor at a tie. [Higham2002, §2.2], in mixed absolute-relative form for gradual underflow.
NLAlib.Computation.absRelErr_binaryFloatRound (fmt : Float.Model.Format) {r : ℝ → ℤ}
(hr : ∀ (x : ℝ), Computation.AbsRelErr 0 (1 / 2) x ↑(r x)) (x : ℝ) :
Computation.AbsRelErr (2⁻¹ ^ fmt.mantissaBits) (2 ^ fmt.minExponent / 2) x
(Computation.binaryFloatRound fmt r x)Import NLAlib.Matrix.FinitePrecision.BinaryFloat.