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

Function simplifyLog

src/compute-engine/symbolic/simplify-log.ts:31–38  ·  view source on GitHub ↗
(x: Expression)

Source from the content-addressed store, hash-verified

29 * `because` label in the cost gate; it now travels with the step as a
30 * `purpose: 'transform'` tag.
31 *
32 * The exempted set is the `ln(...)` / `log_...` label prefixes the cost gate
33 * originally matched, plus the two `e^(… + y)` sums named in
34 * `EXP_OF_LOG_SUM_LABELS`. Those two had been left out only because the
35 * original whitelist did not name them: they were passing on the gate's growth
36 * tolerance instead (`e^(x + ln x)` scores 14, `x·e^x` scores 18). Splitting a
37 * logarithm out from under an exponential is a preferred rewrite whatever it
38 * scores, so it is now tagged outright.
39 *
40 * They are matched by exact label, NOT by an `e^(ln(` prefix: sibling rules in
41 * this file label themselves `e^(ln(x) * y) -> x^y` and

Callers

nothing calls this directly

Calls 1

simplifyLogCoreFunction · 0.85

Tested by

no test coverage detected