TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Scaling.Runtime

Decimal exponent operations #

scaleB multiplies by an exact integral power of ten before its single rounding. Its preferred exponent is the input quantum plus the scale (IEEE 754-2019 §5.3.3). The integer argument is unbounded; it does not impose the coefficient restriction of the older General Decimal Arithmetic scaleb operation.

logB uses an integer result format. Its format-dependent sentinel exceeds twice the absolute bounds on finite exponents. Exceptional inputs raise invalid, including quiet NaNs, as specified for an integer logBFormat in §5.3.3. These are default exception results, without a mutable environment or alternate exception handling.

Multiply by a power of the radix, using the input quantum plus the scale as the preferred quantum for projection.

Instances For

    Integer result and default status for an exponent query.

    • value :

      Radix exponent for a nonzero finite input, or the signed exceptional sentinel.

    • status : Status

      Default exception flags; exceptional integer deliveries signal invalid.

    Instances For

      Exceptional integer exponent, beyond twice either absolute finite exponent bound.

      Instances For

        Radix-ten exponent, using an integer logBFormat. Zero uses the negative sentinel; infinity and either kind of NaN use the positive one.

        Instances For