MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / stripAbs

Function stripAbs

src/compute-engine/boxed-expression/factor.ts:124–128  ·  view source on GitHub ↗

* Replace every `Abs(u)` subexpression with its argument `u`, recursively * (including inside powers and products). `|u|` and `u` have the same square, * so for a polynomial factorization we want the bare polynomial representative * — e.g. `√(x⁶)` simplifies to `|x|³`, and we want `x³`.

(expr: Expression)

Source from the content-addressed store, hash-verified

122 }
123 }
124
125 return op;
126}
127
128/**
129 * `together()` followed by reduction to lowest terms.
130 *
131 * `together()` folds over the *product* of the denominators, so its result is

Callers 1

extractSquareRootFunction · 0.85

Calls 3

isFunctionFunction · 0.90
functionMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected