( initial: Expression, trace: RuleSteps, verbosity: 'default' | 'all' )
| 146 | const initial = isFunction(canonical, 'Equal') |
| 147 | ? canonical |
| 148 | : ce.function('Equal', [canonical, ce.Zero]); |
| 149 | |
| 150 | const trace: RuleSteps = []; |
| 151 | const roots = findUnivariateRoots(canonical, x, 0, trace); |
| 152 | const filtered = filterRootsByAssumptions(ce, roots, x); |
| 153 | |
| 154 | if (filtered.length < roots.length) { |
| 155 | const dropped = roots.filter((r) => !filtered.some((f) => f.isSame(r))); |
| 156 | trace.push({ |
| 157 | value: rootsAsEquations(ce, x, dropped), |
| 158 | because: 'solve.filter-domain', |
| 159 | }); |
| 160 | } |
| 161 | |
| 162 | if (filtered.length > 0) |
| 163 | trace.push({ |
| 164 | value: rootsAsEquations(ce, x, filtered), |
| 165 | because: 'solve.roots', |
| 166 | }); |
no test coverage detected