MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / settleIsReal

Function settleIsReal

src/compute-engine/numerics/numeric.ts:318–329  ·  view source on GitHub ↗
(hA: number, hB: number, v: number)

Source from the content-addressed store, hash-verified

316/**
317 * An 8th-order centered difference approximation can be used to get a highly
318 * accurate approximation of the first derivative of a function.
319 * The formula for the 8th-order centered difference approximation for the
320 * first derivative is given by:
321 *
322 * $$ f'(x) \approx \frac{1}{280h} \left[ -f(x-4h) + \frac{4}{3}f(x-3h) - \frac{1}{5}f(x-2h) + \frac{8}{5}f(x-h) - \frac{8}{5}f(x+h) + \frac{1}{5}f(x+2h) - \frac{4}{3}f(x+3h) + f(x+4h) \right]$$
323 *
324 * Note: Mathematica uses an 8th order approximation for the first derivative
325 *
326 * f: the function
327 * x: the point at which to approximate the derivative
328 * h: the step size
329 *
330 * See https://en.wikipedia.org/wiki/Finite_difference_coefficient
331 */
332/**

Callers 1

reliableLimitSamplesFunction · 0.85

Calls 5

argFunction · 0.85
absMethod · 0.65
powMethod · 0.65
fFunction · 0.50
isFiniteMethod · 0.45

Tested by

no test coverage detected