* Apply the 'Divide' form recursively. For `Divide` expressions, operands * are first passed through `powerForm` before being canonicalized via * `canonicalDivide`. This is because division canonicalization benefits from * having power expressions already normalized (e.g., `a / b^{-1}` simplifies
(expr: Expression)
| 339 | if (!firstOpShadow?.has(symbolNameOf(op1)) && isImaginaryUnit(op1)) |
| 340 | return ce.number(ce.complex(0, -1)); |
| 341 | } |
| 342 | |
| 343 | // Re-box only if some transformation has applied |
| 344 | return ops.every((op, index) => op === expr.ops![index]) |
| 345 | ? expr |
| 346 | : ce._fn(name, ops, { canonical: false }); |
| 347 | } |
| 348 | |
| 349 | /** |
| 350 | * Apply the 'Multiply' form recursively. Each sub-expression is visited |
| 351 | * and any `Multiply` or `Negate` at the current level is canonicalized. |
| 352 | * |
| 353 | * Operands are passed directly to `canonicalMultiply` without calling |
no test coverage detected