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

Function evalCondition

src/compute-engine/rubi/rubi-utils.ts:538–557  ·  view source on GitHub ↗
(json: Json, ctx: Ctx)

Source from the content-addressed store, hash-verified

536 return { coef: -inner.coef, rest: inner.rest };
537 }
538 if (u.operator === 'Multiply' && u.ops) {
539 let coef = 1;
540 const rest: Expression[] = [];
541 for (const f of u.ops) {
542 const fr = ratParts(f);
543 if (fr) coef *= fr[0] / fr[1];
544 else rest.push(f);
545 }
546 return {
547 coef,
548 rest:
549 rest.length === 0
550 ? ce.One
551 : rest.length === 1
552 ? rest[0]
553 : ce.function('Multiply', rest),
554 };
555 }
556 return { coef: 1, rest: u };
557}
558
559/** Rubi SumSimplerAuxQ — recursion over (expanded) sum terms:
560 * - v a sum: every term of v is rational or aux-simpler wrt u

Callers 5

condFunction · 0.90
dispatchMethod · 0.90
buildFunction · 0.85
findFailingConjunctFunction · 0.85
rubi-utils.tsFile · 0.85

Calls 2

failFunction · 0.85
fFunction · 0.50

Tested by 1

condFunction · 0.72