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

Function niceSqrtAux

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

NiceSqrtQ body for non-rational u: would Rt[u,2] be free of fractional * powers and complex factors? Mathematica's RtAux extracts even powers * (Rt[b²,2] = b); CE's sound Power fold keeps √(b²), so test the even-power * structure directly instead of inspecting the folded root.

(u: Expression)

Source from the content-addressed store, hash-verified

2106 acc = next;
2107 continue;
2108 }
2109 acc = combineTriSum(acc, next);
2110 if (acc === null) return null;
2111 }
2112 if (acc === null || acc.kind !== 'tri') return null;
2113 return {
2114 a: acc.p.a.add(constA).evaluate(),
2115 b: acc.p.b,
2116 c: acc.p.c,
2117 n: acc.p.n,
2118 };
2119 }
2120 }

Callers 1

rubi-utils.tsFile · 0.85

Calls 5

isLiteralRationalFunction · 0.85
realNumFunction · 0.85
rtExprFunction · 0.85
fracPowerFactorQFunction · 0.85
isIntegerMethod · 0.45

Tested by

no test coverage detected