Function
inverseFunctionFreeQ
(u: Expression, x: string)
Source from the content-addressed store, hash-verified
| 2300 | ): { scale: Expression; exp: Expression; rest: Expression | null } | null { |
| 2301 | const ce = u.engine; |
| 2302 | if (u.operator !== 'Multiply' || !u.ops) return null; |
| 2303 | let scale = ce.One; |
| 2304 | let exp: Expression = ce.Zero; |
| 2305 | let rest: Expression | null = null; |
| 2306 | for (const f of u.ops) { |
| 2307 | if (!f.has(x)) { |
| 2308 | scale = scale.mul(f); |
| 2309 | continue; |
| 2310 | } |
| 2311 | const m = monoPartsX(f, x); |
| 2312 | if (m !== null) { |
| 2313 | scale = scale.mul(m.coef); |
| 2314 | exp = exp.add(m.exp); |
| 2315 | continue; |
Tested by
no test coverage detected