sum terms of a base (Add/Subtract), through odd literal powers * (Rubi SumBaseQ companions); null when not a sum base
(u: Expression)
| 1332 | * elliptic branch-phase cluster: e^{iπ/4} errors came from taking the root |
| 1333 | * of the whole quotient instead of the split). */ |
| 1334 | function 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) */ |
| 1345 | function nthRoot(u: Expression, n: number): Expression { |
no test coverage detected