sorted symbol leaves of a term, reversed (MMA compares monomials from * their trailing factor)
(e: Expression)
| 1145 | // Rubi PosAux (sign heuristic): numbers by value; symbols positive; |
| 1146 | // products multiply signs; sums take the first term; even powers positive. |
| 1147 | function posAux(u: Expression): boolean { |
| 1148 | const r = realNum(u); |
| 1149 | if (r !== null) return r > 0; |
| 1150 | const n = u.N(); |
| 1151 | if (isNumber(n) && typeof n.re === 'number' && typeof n.im === 'number') { |
| 1152 | return n.re !== 0 ? n.re > 0 : n.im > 0; |
| 1153 | } |
| 1154 | if (u.symbol) return true; |
| 1155 | if (u.operator === 'Power' && u.ops) { |
| 1156 | const e = u.ops[1]; |
no test coverage detected