TorchLean API

FloatLib.Floats.Formats.P3109.Conversion.Comparison

Exact meaning of conversion range comparisons #

The scalable rational/dyadic comparator first tests signs and leading exponents. Its answer is the ordinary rational order, including zero significands and negative values. This connects the executable conversion range indicator with the mathematical finite interval.

theorem FloatLib.Floats.Formats.P3109.compareDyadic_eq_compare (negative : Bool) (numerator denominator : ) (value : Numerics.Dyadic) (hd : denominator 0) :
Numerics.RationalBinary.compareDyadic? negative numerator denominator value = some (compare (RationalRounding.signed negative (numerator / denominator)) value.toRat)

The scalable comparison with an arbitrary dyadic is its exact signed rational order.

The executable exact-range test is precisely strict exclusion from the finite interval.

The pre-saturation overflow indicator is strict exclusion of the rounded rational value.