• Preparing search index...
  • The search index is not available
emath.js
  • emath.js
  • classes/numericalAnalysis/sum
  • calculateSumLoop

Function calculateSumLoop

  • calculateSumLoop(f, b, a?, epsilon?): Decimal
  • Calculates the sum of f(n) from a to b using a basic loop until the sum is less than or equal to epsilon geometrically. See calculateSum for a more general function.

    Parameters

    • f: ((n: Decimal) => Decimal)

      The function f(n) to calculate the sum.

        • (n): Decimal
        • Parameters

          • n: Decimal

          Returns Decimal

    • b: DecimalSource

      The upper limit for the sum.

    • a: DecimalSource = 0

      The lower limit for the sum. Defaults to 0. The order is reversed because a is optional. Deal with it.

    • epsilon: DecimalSource = DEFAULT_TOLERANCE

      The maximum error tolerance, geometrically. Defaults to DEFAULT_TOLERANCE.

    Returns Decimal

    The calculated sum of f(n), as a Decimal.

    • Defined in classes/numericalAnalysis/sum.ts:17

Settings

Member Visibility
emath.js
  • Loading...

Generated using TypeDoc