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

Function isDefiniteValue

src/compute-engine/symbolic/limit.ts:847–852  ·  view source on GitHub ↗

* A resolved, usable limit value: free of the limit variable, and neither * (complex) infinity nor NaN. Crucially this accepts finite *symbolic* * constants (`ln 5`, `π/4`, `e`), whose `.isFinite` is `undefined` because the * engine hasn't numericized them.

(e: Expression, x?: string)

Source from the content-addressed store, hash-verified

845 if (!l) return undefined;
846 if (l.isInfinity === true) {
847 infinities++;
848 if (l.isNegative === true) infinitySign = -infinitySign;
849 } else if (isDefiniteValue(l)) {
850 result = result.mul(l);
851 } else return undefined;
852 }
853 if (infinities > 0) {
854 const s = (result.isNegative === true ? -1 : 1) * infinitySign;
855 return s < 0 ? ce.NegativeInfinity : ce.PositiveInfinity;

Callers 6

limitAtFiniteFunction · 0.85
limitAtPosInfFunction · 0.85
limitPowerAtPosInfFunction · 0.85
limitProductAtPosInfFunction · 0.85
expOfLimitFunction · 0.85
lnOfLimitFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected