TorchLean API

FloatLib.Floats.Formats.FixedPoint.Bounded.Configured.Conversion.Instances

Bounded fixed-point conversion instances #

Bounded fixed-point destinations support exact-rational quantization under an explicit overflow policy. The context-free instance chooses checked conversion and therefore rejects overflow.

@[instance_reducible]
instance FloatLib.Floats.ExecFloat.BoundedFixedPoint.Conversion.quantizer {radix : Numerics.Radix} {fractionalDigits width : } :
Quantizer (BoundedFixedPoint radix fractionalDigits width)

Bounded fixed-point conversion requires an explicit overflow policy.

@[instance_reducible]
instance FloatLib.Floats.ExecFloat.BoundedFixedPoint.Conversion.defaultQuantizer {radix : Numerics.Radix} {fractionalDigits width : } :
DefaultQuantizer (BoundedFixedPoint radix fractionalDigits width)

Context-free bounded conversion is checked and rejects overflow.