• Preparing search index...
  • The search index is not available
emath.js
  • emath.js
  • classes/numericalAnalysis/inverseFunction
  • calculateInverseFunction

Function calculateInverseFunction

  • calculateInverseFunction(f, n, options?): InverseFunctionApproxResult
  • Approximates the inverse of a function at n using the bisection / binary search method. See Decimal.increasingInverse for a more general function.

    Parameters

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

      The function to approximate the inverse of. It must be monotonically increasing and satisfy f(n) >= n for all n >= 0.

        • (x): Decimal
        • Parameters

          • x: Decimal

          Returns Decimal

    • n: DecimalSource

      The value to approximate the inverse at.

    • options: Partial<InverseFunctionOptions> = {}

      The options for the approximation. See InverseFunctionOptions

    Returns InverseFunctionApproxResult

    An object containing the approximate inverse value "value" (defaults to the lower bound), the lower bound "lowerBound", and the upper bound "upperBound", all as Decimal instances.

    Example

    const f = (x) => x.pow(2);
    const inverse = inverseFunctionApprox(f, 16);
    console.log(inverse.value); // ~3.9999999999999996
    • Defined in classes/numericalAnalysis/inverseFunction.ts:78

Settings

Member Visibility
emath.js
  • Loading...

Generated using TypeDoc