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

Function mmaFirstTerm

src/compute-engine/rubi/rubi-utils.ts:1132–1143  ·  view source on GitHub ↗
(ops: readonly Expression[])

Source from the content-addressed store, hash-verified

1130 return true;
1131}
1132
1133function intCmp(
1134 args: Json[],
1135 ctx: Ctx,
1136 cmp: (a: number, b: number) => boolean
1137): boolean {
1138 const u = build(args[0], ctx).evaluate();
1139 if (!isLiteralInteger(u)) return false;
1140 const a = realNum(u);
1141 const b = realNum(build(args[1], ctx));
1142 return a !== null && b !== null && cmp(a, b);
1143}
1144
1145// Rubi PosAux (sign heuristic): numbers by value; symbols positive;
1146// products multiply signs; sums take the first term; even powers positive.

Callers 2

posAuxFunction · 0.85
negSumBaseQFunction · 0.85

Calls 2

mmaTermKeyFunction · 0.85
mmaKeyLessFunction · 0.85

Tested by

no test coverage detected