TorchLean API

FloatLib.Floats.Formats.P3109.Arithmetic.Queries.Runtime

P3109 queries and adjacent values #

Format queries expose the descriptor and its distinguished encoded values. Classification and adjacent-value operations inspect codes directly, so their cost does not depend on the decoded exponent. maxSubnormalOf returns NaN at precision one. nextGreaterThan maps positive infinity to NaN, and nextLessThan maps negative infinity to NaN: these are deliberately different from IEEE nextUp and nextDown.

Reference: P3109 unapproved interim report 4.0.3, revision 34f5964, §§4.13–4.16.

@[inline]

Total encoded width, as queried by §4.14.

Instances For
    @[inline]

    Precision including the implicit leading bit.

    Instances For
      @[inline]

      Whether negative finite values are represented.

      Instances For
        @[inline]

        Whether infinities are represented.

        Instances For
          @[inline]

          Width of the biased exponent.

          Instances For
            @[inline]

            Width of the trailing significand field.

            Instances For
              @[inline]

              Bias subtracted from nonzero encoded exponents.

              Instances For
                @[inline]

                Largest finite value as a value of the queried format.

                Instances For
                  @[inline]

                  Smallest finite value; unsigned formats return zero.

                  Instances For
                    @[inline]

                    Least strictly positive value.

                    Instances For
                      @[inline]

                      Largest positive subnormal, or NaN when precision one leaves no subnormal values.

                      Instances For
                        @[inline]

                        Least positive normal value.

                        Instances For
                          @[inline]

                          The format's unique zero has code zero.

                          Instances For
                            @[inline]

                            Test the unique NaN code.

                            Instances For
                              @[inline]

                              Test either infinity, respecting signedness and the finite/extended domain.

                              Instances For
                                @[inline]

                                Finite excludes NaN and either infinity.

                                Instances For
                                  @[inline]

                                  Negative finite values and negative infinity have negative sign; NaN and zero do not.

                                  Instances For
                                    @[inline]

                                    Unsigned magnitude code, removing the sign partition in signed formats.

                                    Instances For
                                      @[inline]

                                      Test exact numerical equality to one without constructing a large rational.

                                      Instances For
                                        @[inline]

                                        Normal values are finite and have a nonzero biased exponent in their magnitude code.

                                        Instances For
                                          @[inline]

                                          Nonzero finite values below the normal range.

                                          Instances For
                                            @[inline]

                                            Least greater value, or NaN when there is no greater datum.

                                            Instances For
                                              @[inline]

                                              Greatest lesser value, or NaN when there is no lesser datum.

                                              Instances For