TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Configured.Conversion.Instances

Configured binary-interchange conversion instances #

Configured binary-interchange destinations support signed-rational quantization with finite, infinity, and exceptional policies, and conversions into them accept all six rounding directions as (mode := ...).

@[instance_reducible]

Every configured binary destination supports policy-aware signed-rational quantization.

@[instance_reducible]

Conversions into a binary destination take an IEEERoundingMode, nearest-even by default.

@[instance_reducible, inline]

A conversion's (mode := m) selects Context.withRounding m, and .nearest the canonical Context.default that it equals.

A cast whose source decodes to a finite exact value is the canonical nearest-even rounding of that value in the destination format.

The hypothesis names the decoded value, so the theorem applies to any source with an exact decoder and an embedding into SignedRat. For conventional IEEE destinations and finite results, Model.toReal_roundRatScaled_eq_roundAt supplies the corresponding real-number meaning.