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

Function sumBaseTerms

src/compute-engine/rubi/rubi-utils.ts:1334–1342  ·  view source on GitHub ↗

sum terms of a base (Add/Subtract), through odd literal powers * (Rubi SumBaseQ companions); null when not a sum base

(u: Expression)

Source from the content-addressed store, hash-verified

1332 * elliptic branch-phase cluster: e^{iπ/4} errors came from taking the root
1333 * of the whole quotient instead of the split). */
1334function rtExpr(u: Expression, n: number | Expression): Expression {
1335 const ce = u.engine;
1336 const nn = typeof n === 'number' ? ce.number(n) : n;
1337 const nv = realNum(nn);
1338 const v = safeSimplify(u); // ≈ TogetherSimplify
1339 if (nv === null || !Number.isInteger(nv) || nv < 1)
1340 return v.pow(ce.One.div(nn)).evaluate();
1341 return rtAux(v, nv);
1342}
1343
1344/** literal principal root u^(1/n) (Rubi NthRoot) */
1345function nthRoot(u: Expression, n: number): Expression {

Callers 4

sumBaseQFunction · 0.85
negSumBaseQFunction · 0.85
allNegTermQFunction · 0.85
someNegTermQFunction · 0.85

Calls 4

sumTermsXFunction · 0.85
realNumFunction · 0.85
absMethod · 0.65
isIntegerMethod · 0.45

Tested by

no test coverage detected