TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Quantize.Runtime

Rounding to a specified decimal quantum #

IEEE 754-2019 §5.3.2 specifies quantize independently of ordinary projection: the target quantum is fixed, and a coefficient that does not fit produces invalid instead of changing that quantum. Underflow and overflow flags are never raised.

Round a nonnegative magnitude to a fixed quantum, retaining the supplied sign. An invalid quantum or an oversized rounded coefficient produces a quiet NaN.

Instances For

    Quantize the first operand to the second operand's quantum. The second operand's sign and coefficient do not affect a finite result.

    Instances For