TorchLean API

FloatLib.Floats.Formats.P3109.Arithmetic.Extrema.Runtime

P3109 comparisons and extrema #

Comparisons are unordered at NaN. The ten extrema differ in NaN handling, magnitude ordering, and preference for finite operands. Equal magnitudes use numerical order to resolve the sign: minimum selects the negative operand, maximum the positive operand.

Reference: P3109 unapproved interim report 4.0.3, revision 34f5964, §§4.11–4.12.

Strict extended-real comparison; NaN is unordered, including with itself.

Instances For

    Numerical equality, ignoring NaN payloads by making every NaN comparison false.

    Instances For

      Non-strict extended-real comparison; NaN remains unordered.

      Instances For

        Reverse strict comparison.

        Instances For

          Reverse non-strict comparison.

          Instances For

            Minimum absolute value, resolving equal magnitudes toward the numerically smaller datum.

            Instances For

              Maximum absolute value, resolving equal magnitudes toward the numerically larger datum.

              Instances For

                Minimum finite variant: finite values outrank infinities, which outrank NaN.

                Instances For

                  Maximum finite variant: finite values outrank infinities, which outrank NaN.

                  Instances For
                    @[inline]

                    Strict comparison of decoded operands, with NaN unordered.

                    Instances For
                      @[inline]

                      Non-strict comparison of decoded operands, with NaN unordered.

                      Instances For
                        @[inline]

                        Numerical equality; NaN compares unequal to every operand.

                        Instances For
                          @[inline]

                          Strict reverse comparison of decoded operands.

                          Instances For
                            @[inline]

                            Non-strict reverse comparison of decoded operands.

                            Instances For
                              @[inline]

                              Minimum with NaN propagation and the supplied final projection.

                              Instances For
                                @[inline]

                                Maximum with NaN propagation and the supplied final projection.

                                Instances For
                                  @[inline]

                                  Minimum with a numerical operand preferred to NaN.

                                  Instances For
                                    @[inline]

                                    Maximum with a numerical operand preferred to NaN.

                                    Instances For
                                      @[inline]

                                      Minimum magnitude, with negative sign preferred at a tie.

                                      Instances For
                                        @[inline]

                                        Maximum magnitude, with positive sign preferred at a tie.

                                        Instances For
                                          @[inline]

                                          Minimum magnitude with a numerical operand preferred to NaN.

                                          Instances For
                                            @[inline]

                                            Maximum magnitude with a numerical operand preferred to NaN.

                                            Instances For
                                              @[inline]

                                              Minimum preferring finite values to infinity and infinity to NaN.

                                              Instances For
                                                @[inline]

                                                Maximum preferring finite values to infinity and infinity to NaN.

                                                Instances For