(a: Expression, b: Expression)
| 265 | // factorPolynomial must return a fully-factored, prime-power form so that |
| 266 | // partial-fraction decomposition sees irreducible factors. extractContent |
| 267 | // only handled the numeric GCD, and pre-factored Multiply/Power inputs were |
| 268 | // never recursed into — so x³+x² and x·(x²+x) came back unfactored. |
| 269 | const sameValue = (a: Expression, b: Expression) => { |
| 270 | for (const xv of [2, -3, 5, 0.7]) { |
| 271 | expect(a.subs({ x: xv }).N().re).toBeCloseTo(b.subs({ x: xv }).N().re); |
| 272 | } |
| 273 | }; |
| 274 |
no test coverage detected