TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Conversion.Format.Runtime

Conversion between decimal interchange formats #

Conversion.convertFormat rounds once to the destination precision and exponent range. The source quantum is the preferred quantum, including for signed zero. The operation acts on datums; BID and DPD are independent encoding choices.

NaNs are quieted, with invalid raised exactly for signaling NaNs. A payload that fits the destination is preserved; an oversized payload becomes zero. The sign is retained for every exceptional operand and for exact or rounded zero.

References #

Convert a decimal datum to target, using its source quantum as the preferred quantum. Finite inputs undergo one exact rational projection in any of the five rounding directions. Signaling NaNs become quiet and raise invalid.

Instances For