( expr: Expression )
| 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); |
nothing calls this directly
no test coverage detected