TorchLean API

FloatLib.Floats.Formats.Posit.Trigonometric.Pi.Runtime

Correctly rounded pi-scaled posit trigonometric functions #

The argument is multiplied by pi exactly, before the final posit rounding. Rational special values and tangent poles are classified exactly. The inverse functions divide the exact principal angle by pi, without first rounding that angle to a posit.

These functions follow the Posit Standard (2022), ยง5.5.

def FloatLib.Floats.Formats.Posit.Model.sinPi {format : Format} (value : Model format) :
Model format

Correctly rounded sine of pi times the input, including exact rational special values.

Instances For
    def FloatLib.Floats.Formats.Posit.Model.cosPi {format : Format} (value : Model format) :
    Model format

    Correctly rounded cosine of pi times the input, including exact rational special values.

    Instances For
      def FloatLib.Floats.Formats.Posit.Model.tanPi {format : Format} (value : Model format) :
      Model format

      Correctly rounded tangent of pi times the input; half-integer arguments produce NaR.

      Instances For
        def FloatLib.Floats.Formats.Posit.Model.arcSinPi {format : Format} (value : Model format) :
        Model format

        Correctly rounded principal inverse sine divided by pi; its real domain is [-1, 1].

        Instances For
          def FloatLib.Floats.Formats.Posit.Model.arcCosPi {format : Format} (value : Model format) :
          Model format

          Correctly rounded principal inverse cosine divided by pi; its real domain is [-1, 1].

          Instances For
            def FloatLib.Floats.Formats.Posit.Model.arcTanPi {format : Format} (value : Model format) :
            Model format

            Correctly rounded principal inverse tangent divided by pi.

            Instances For