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

Function rtAux

src/compute-engine/rubi/rubi-utils.ts:1371–1386  ·  view source on GitHub ↗
(u: Expression, n: number)

Source from the content-addressed store, hash-verified

1369 walk(e.ops[0], inv);
1370 return;
1371 }
1372 // unit factors regenerate the same product after canonical mul
1373 // (1/(d·w) → [1, d⁻¹, w⁻¹] → pull 1 → rest re-canonicalizes to u) —
1374 // skip them in either position
1375 if (e.isSame(1)) return;
1376 if (!inv) {
1377 out.push(e);
1378 return;
1379 }
1380 if (e.operator === 'Power' && e.ops)
1381 out.push(ce._fn('Power', [e.ops[0], e.ops[1].neg()]));
1382 else out.push(ce._fn('Power', [e, ce.NegativeOne]));
1383 };
1384 walk(u, false);
1385 return out;
1386}
1387
1388const productOf = (ce: ComputeEngine, fs: Expression[]): Expression =>
1389 fs.length === 0

Callers 2

rtExprFunction · 0.85
rtAuxBodyFunction · 0.85

Calls 5

rtAuxBodyFunction · 0.85
nthRootFunction · 0.70
errorMethod · 0.65
sliceMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected