TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Format

Decimal interchange layouts #

The named presets have the parameters of IEEE 754-2019, Table 3.6 and §3.5.2. The descriptor also permits custom layouts, without identifying them as standardized formats. Both BID and DPD represent the same datums, with an externally selected encoding. The quantum exponent bounds concern the stored coefficient, including its trailing zeros, rather than a normalized significand.

A decimal layout with one sign bit, five combination bits, an exponent continuation, and a sequence of ten-bit declets. The positive exponent width separates NaN signaling from payload bits. Bias is unrestricted: the codec does not require quantum zero to be representable. Precision is 3 * declets + 1; this is an interchange descriptor, not a descriptor for every decimal precision. Custom layouts need not be IEEE formats.

  • declets :

    Number of trailing groups of three decimal digits.

  • exponentBits :

    Width of the exponent continuation field in the DPD encoding.

  • bias :

    Bias subtracted from the encoded exponent to obtain the quantum exponent.

  • exponentBits_pos : 0 < self.exponentBits

    At least one exponent-continuation bit separates NaN signaling from payload bits.

Instances For

    IEEE 754 decimal32 interchange parameters.

    Instances For

      IEEE 754 decimal64 basic-format parameters.

      Instances For

        IEEE 754 decimal128 basic-format parameters.

        Instances For

          Total number of stored bits, including the sign and combination fields.

          Instances For

            Significand precision in decimal digits.

            Instances For

              Radix of the trailing significand field.

              Instances For

                Radix of the exponent continuation field.

                Instances For

                  Exclusive bound on a NaN payload or the trailing decimal digits.

                  Instances For

                    Exclusive bound on a finite coefficient, equal to 10 ^ precision.

                    Instances For

                      Exclusive bound on the biased exponent. The fourth high-bit pair is reserved.

                      Instances For

                        Place value of the sign bit.

                        Instances For

                          Smallest quantum exponent, including subnormal datums.

                          Instances For

                            Largest quantum exponent for a stored coefficient.

                            Instances For

                              An optional arithmetic assumption: quantum zero belongs to the representable interval. The codecs and general rounding operations do not require it.

                              • bias_nonneg : 0 f.bias

                                Quantum zero is not below the smallest representable quantum.

                              • bias_lt : f.bias < f.exponentBound

                                Quantum zero is not above the largest representable quantum.

                              Instances

                                The optional bias bounds say exactly that quantum zero is representable.

                                The signaling-bit place value is a whole number of trailing significand fields.