NLA-lib Explorer

NLAlib.Computation.isBinaryRep_binaryFloatRound

Library · theorem

Rounding an input of magnitude at most the largest finite value produces a represented value with bounded significand and exponent. The exponent layout has at least two bits; this excludes older core's degenerate one-bit layouts. Mantissa carry is handled explicitly.

NLAlib.Computation.isBinaryRep_binaryFloatRound (fmt : Float.Model.Format)
  (he : 2 ≤ fmt.exponentBits) {r : ℝ → ℤ} (hr : ∀ (x : ℝ), Computation.AbsRelErr 0 (1 / 2) x ↑(r x))
  {x : ℝ} (hx : |x| ≤ fmt.maxFinite) :
  Computation.IsBinaryRep fmt (Computation.binaryFloatRound fmt r x)

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.BinaryFloat.