TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Queries.Runtime

Decimal classification and quantum queries #

The predicates of IEEE 754-2019 §§5.7.2–5.7.3 are non-signaling, including on signaling NaNs. Normality depends on numerical magnitude, not coefficient length: different members of one cohort have the same classification. quantumExponent is an additional finite-datum query, not an IEEE operation name. Canonicality belongs to the stored word because decoding accepts redundant words.

@[reducible, inline]

Decimal classification uses the shared ten IEEE floating-point classes.

Instances For

    Finiteness includes either sign of zero.

    Instances For

      Test numerical zero, independently of its sign and quantum.

      Instances For

        Test either signed infinity.

        Instances For

          Test either signaling or quiet NaN.

          Instances For

            A finite value is normal when its magnitude reaches the format's normal threshold.

            Instances For

              A subnormal is nonzero and smaller in magnitude than the normal threshold.

              Instances For

                Classify a datum without changing it or raising invalid on a signaling NaN.

                Instances For

                  Return a finite datum's stored quantum exponent; special values return none.

                  Instances For

                    Equal finite quanta, or two infinities, or two NaNs, as specified by §5.7.3. Signs, coefficients and NaN signaling bits are immaterial.

                    Instances For

                      The decimal radix, including for a special operand.

                      Instances For

                        Test canonical storage, including redundant DPD declets, oversized BID coefficients and ignored infinity/NaN bits. Decoding alone cannot distinguish these representations.

                        Instances For