TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Comparison.Runtime

Exact decimal comparisons #

IEEE 754-2019 §5.6.1 requires the 22 predicates of Tables 5.1–5.2. Comparison uses exact rational values extended by two infinities; it ignores finite cohorts and equates signed zeros. NaNs are unordered. Quiet comparisons raise invalid only for signaling NaNs; signaling comparisons raise invalid for either kind of NaN. No other exception is raised.

@[reducible, inline]

Exact ordered values, with negative and positive infinity at the endpoints.

Instances For

    Ordered numerical meaning. NaN is absent, rather than assigned an ordered value.

    Instances For

      Four comparison relations: none is unordered, and some is less, equal or greater.

      Instances For
        @[reducible, inline]

        Truth sets named in the IEEE comparison tables.

        Instances For
          @[reducible, inline]

          A predicate result and its default IEEE exception flags.

          Instances For

            Evaluate a quiet predicate, signaling invalid only for an sNaN operand.

            Instances For

              Evaluate a signaling predicate, signaling invalid for any NaN operand.

              Instances For

                Quiet equality; signed zeros and equal-valued cohorts compare equal.

                Instances For

                  Quiet inequality, true on unordered operands.

                  Instances For

                    Quiet less-than-or-unordered comparison, the complement of greater-than-or-equal.

                    Instances For

                      Quiet complement of greater-than, including unordered pairs.

                      Instances For

                        Quiet complement of less-than, including unordered pairs.

                        Instances For

                          Quiet greater-than-or-unordered comparison, the complement of less-than-or-equal.

                          Instances For

                            Signaling inequality, true on unordered operands.

                            Instances For