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

Function powerSetIterator

src/compute-engine/library/combinatorics.ts:474–492  ·  view source on GitHub ↗
(
  expr: Expression
)

Source from the content-addressed store, hash-verified

472 isNumber(kExpr) &&
473 !nExpr.isComplex &&
474 !kExpr.isComplex &&
475 nExpr.isInteger &&
476 kExpr.isInteger
477 ) {
478 const n = toBigint(nExpr);
479 const k = toBigint(kExpr);
480 if (n !== null && k !== null) {
481 const r = binomialBigint(n, k, ce._deadline);
482 return r === undefined ? undefined : ce.number(r);
483 }
484 }
485
486 // Complex operands: no closed form implemented here; stay symbolic.
487 if (
488 (isNumber(nExpr) && nExpr.isComplex) ||
489 (isNumber(kExpr) && kExpr.isComplex)
490 )
491 return undefined;
492
493 // A Γ factor on a pole. Exact, so answered on both routes, and before the
494 // kernel — the Γ-ratio overflows to garbage there.
495 // Under `.N()` the operands are floats (`n − k + 1 = −60 + 1e-29` is not a

Callers

nothing calls this directly

Calls 4

isFunctionFunction · 0.90
eachMethod · 0.65
symbolMethod · 0.65
_fnMethod · 0.65

Tested by

no test coverage detected