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

Function complementIterator

src/compute-engine/library/sets.ts:1523–1533  ·  view source on GitHub ↗
(
  expr: Expression
)

Source from the content-addressed store, hash-verified

1521 : undefined;
1522 return reduced ?? ce._fn('ResidueClass', args);
1523 },
1524 // The operands are evaluated exactly, also under `.N()` (see `lazy`).
1525 // Both operands are evaluated, and nothing else is read of them.
1526 evaluatesOperands: true,
1527 evaluate: (ops, { engine: ce }) => {
1528 if (ops.length !== 2 || !ops.every((x) => x.isValid)) return undefined;
1529 const [k, n] = ops.map((x) => x.evaluate());
1530 return residueClassOf(ce, k, n) ?? ce._fn('ResidueClass', [k, n]);
1531 },
1532 // Two classes of one modulus are equal when their residues are. Classes
1533 // of different moduli, or a class and an integer, are not compared: no
1534 // answer rather than a wrong one.
1535 eq: (a, b) => {
1536 const x = residueOf(a);

Callers

nothing calls this directly

Calls 3

isFunctionFunction · 0.90
eachMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected