NLA-lib Explorer

Float.Model.BinaryRounding.IsNearestFloat

Library · def

A represented value is nearest to a real input if it is at least as close as every represented value of the lower-exponent format. Ties are broken in any way, so this covers round-to-nearest-even without stating the tie rule.

Float.Model.BinaryRounding.IsNearestFloat (p : ℕ) (emin : ℤ) (x r : ℝ) : Prop

Full source on GitHub

Import NLAlib.ForMathlib.Data.Float.BinaryFormat.