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

Function compiledProbe

src/compute-engine/symbolic/limit.ts:701–719  ·  view source on GitHub ↗
(
  e: Expression,
  x: string,
  ce: ComputeEngine
)

Source from the content-addressed store, hash-verified

699 if (op === 'Erf' || op === 'Erfc') {
700 const inner = limitAtPosInf(o1(e), x, ce, depth + 1);
701 if (!inner) return undefined;
702 if (inner.isInfinity === true) {
703 // Only a *signed* real infinity saturates. A directionless infinity
704 // (e.g. ComplexInfinity) has neither `isPositive` nor `isNegative` set —
705 // stay symbolic rather than defaulting to the +∞ branch (mirrors the
706 // Sqrt/Root guard above).
707 if (inner.isPositive === true) return op === 'Erf' ? ce.One : ce.Zero;
708 if (inner.isNegative === true)
709 return op === 'Erf' ? ce.number(-1) : ce.number(2);
710 return undefined;
711 }
712 if (isDefiniteValue(inner)) return ce.function(op, [inner]).evaluate();
713 return undefined;
714 }
715
716 return undefined;
717}
718
719function limitRatioAtPosInf(
720 num: Expression,
721 den: Expression,
722 x: string,

Callers 1

numericAtFunction · 0.85

Calls 5

getMethod · 0.65
functionMethod · 0.65
symbolMethod · 0.65
_compileMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected