TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.DirectedSemantics.Division

Directed division soundness for conventional IEEE formats #

For finite operands and a nonzero divisor, divDown and divUp round the exact rational quotient in opposite directions. The extended-real statements remain valid when outward rounding overflows.

The bounds hold for every descriptor satisfying fmt.isIEEE = true, with no restriction to named widths. The operands must be finite and the divisor nonzero; the result may be infinite.

The exact scaled rational quotient of two finite values denotes their real quotient.

Downward-rounded division is a lower bound on the exact real quotient.

theorem FloatLib.Floats.Formats.BinaryInterchange.Model.le_toEReal_divUp {fmt : FloatFormat} (x y : Model fmt) (hfmt : fmt.isIEEE = true) (hx : x.isFinite = true) (hy : y.isFinite = true) (hy0 : y.isZero = false) :
↑(x.toReal / y.toReal) (x.divUp y).toEReal

The exact real quotient is bounded above by upward-rounded division.