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.