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

Function isApproximateInstance

scripts/fungrim/numeric-check.ts:110–117  ·  view source on GitHub ↗

* Does this formula instance involve an *approximating* numeric operation — * quadrature, numeric limit extraction, or an infinite series truncated at * MAX_ITERATION? Their results carry approximation error far above REL_TOL.

(formula: unknown)

Source from the content-addressed store, hash-verified

108
109/**
110 * Does this formula instance involve an *approximating* numeric operation —
111 * quadrature, numeric limit extraction, or an infinite series truncated at
112 * MAX_ITERATION? Their results carry approximation error far above REL_TOL.
113 */
114function isApproximateInstance(formula: unknown): boolean {
115 const s = JSON.stringify(formula);
116 if (/"(Limit|NLimit|Integrate|NIntegrate)"/.test(s)) return true;
117 return (
118 /"(Sum|Product)"/.test(s) &&
119 /"(PositiveInfinity|NegativeInfinity)"/.test(s)
120 );

Callers 1

checkInstanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected