TorchLean API

FloatLib.Floats.Formats.P3109.Arithmetic.External.Runtime

P3109 arithmetic with external binary destinations #

The report's projection uses the external format's actual precision, bias, and finite endpoints. It keeps all nine rounding modes and all three saturation modes, with caller-supplied stochastic bits. Finite overflow under SaturationMode.propagate clamps, while an infinite exact input stays infinite. The destination encoder writes positive zero and canonical quiet NaN, as required by §4.8.2.

Finite encoding uses the proved binary dyadic encoder on an already rounded, in-range datum, and External.Proof shows that this encoding adds no second rounding error. The adapters accept IEEE-style encoding descriptors, including binary16, binary32, binary64, and BFloat16. They do not change the ordinary IEEE arithmetic or signed-zero conversion APIs.

Reference: P3109 unapproved interim report 4.0.3, revision 34f5964, §§4.7–4.10 and 4.14.

Round an exact rational with the external format's precision and exponent bias.

Instances For

    Apply precision rounding, retaining infinity and canonicalizing NaN.

    Instances For

      Exact largest finite external binary value, with a supplied sign.

      Instances For

        Saturate a finite overflow under the external format's signed, extended domain.

        Instances For

          Saturate after rounding. Under .propagate, finite overflow clamps but infinity stays.

          Instances For

            Encode a projected external datum, using positive zero and canonical quiet NaN.

            Instances For

              External report projection. The isIEEE evidence excludes non-IEEE exceptional encodings.

              Instances For

                Complete exact external decoding with zero signs and NaN payloads erased.

                Instances For
                  @[instance_reducible]

                  A binary model can be an external source of mixed report arithmetic.

                  Report projection into an external model, with no storage-plan requirements.

                  Instances For

                    Report projection into a configured external carrier through its exact model codec.

                    Instances For
                      @[inline]

                      External bit width from the complete binary descriptor.

                      Instances For
                        @[inline]

                        External precision includes the implicit leading bit.

                        Instances For
                          @[inline]

                          External IEEE formats are signed.

                          Instances For
                            @[inline]

                            External IEEE formats have the extended domain.

                            Instances For
                              @[inline]

                              External exponent-field width.

                              Instances For
                                @[inline]

                                The external format's own bias, with no P3109 bias substituted.

                                Instances For
                                  @[inline]

                                  Smallest strictly positive external datum.

                                  Instances For
                                    @[inline]

                                    Largest positive external subnormal.

                                    Instances For
                                      @[inline]

                                      Smallest positive external normal.

                                      Instances For