Error Bounds for General Rounding Modes #
A valid rounding mode selects one of the two adjacent representable values. Consequently its absolute error is at most one ULP. Nearest rounding sharpens this to half an ULP; this file records the one-ULP result needed for directed and toward-zero modes.
theorem
FloatLib.Floats.Formats.Flocq.relative_error_round_FLX_of_valid
{β : Numerics.Radix}
(prec : ℤ)
(hprec : 0 < prec)
(rnd : ℝ → ℤ)
[ValidRnd rnd]
(x : ℝ)
(hx : x ≠ 0)
:
Every valid FLX rounding mode has relative error at most β^(1-prec).
theorem
FloatLib.Floats.Formats.Flocq.round_relative_error_FLX_of_valid
{β : Numerics.Radix}
(prec : ℤ)
(hprec : 0 < prec)
(rnd : ℝ → ℤ)
[ValidRnd rnd]
(x : ℝ)
(hx : x ≠ 0)
:
General FLX rounding admits a multiplicative error model with a one-ULP relative bound.