xen-dev-utils
    Preparing search index...

    Function getConvergents

    • Calculate best rational approximations to a given fraction that are closer than any approximation with a smaller or equal denominator unless non-monotonic approximations are requested as well.

      Parameters

      • value: FractionValue

        The fraction to simplify.

      • OptionalmaxDenominator: number

        Maximum denominator to include.

      • OptionalmaxLength: number

        Maximum length of the array of approximations.

      • includeSemiconvergents: boolean = false

        Include semiconvergents.

      • includeNonMonotonic: boolean = false

        Include non-monotonically improving approximations.

      Returns Fraction[]

      An array of (semi)convergents.