TorchLean API

FloatLib.Numerics.Enclosure.Trigonometric.Reduction.Runtime

Rational period reduction for sine and cosine #

An enclosed quarter period supplies an approximate full period in [4, 8]. Rounding the quotient to an integer leaves a rational Taylor argument in [-4, 4]. The output radius includes the accumulated period error, using the global Lipschitz bound of sine and cosine. Thus the reduction remains valid even when the selected integer changes as precision grows.

The number of series terms need not grow with the magnitude of the reduced argument. The precision needed in the period still grows with the input magnitude, as expected for range reduction. All arithmetic here is rational; there is no machine approximation to π.

A positive rational approximation to π/4, bounded between one half and one.

Instances For

    The nearest integer number of approximate full periods, with upward half ties.

    Instances For

      The exact rational remainder after removing the approximate periods.

      Instances For

        Error from replacing true periods by the rational approximate periods.

        Instances For

          Combined Taylor and period-reduction error.

          Instances For

            A sine enclosure with a Taylor argument of magnitude at most four.

            Instances For

              A cosine enclosure with the same bounded rational period reduction.

              Instances For