Cost Calculator

Every operation's SuperBEST node cost in one table. Positive-domain default; general-domain column shows where the cost splits. v5.3 of the cost model — the same table live-optimizer uses.

OpExpressionPositiveGeneralNote
expexp(x) = eˣ1n1nuniversal — no domain restriction
lnln(x)1n1nvia EXL(0, x) — needs x > 0
loglogₐ(x) = ln(x) / ln(a)1n1nsame as ln, normalized
sqrt√x1n1nvia EPL(½, x) — needs x ≥ 0
recip1 / x1n1nvia EPL(−1, x) — needs x ≠ 0
powxⁿ1n1nvia EPL(n, x) — needs x > 0
+x + y2n2ntwo nodes in strict F16
x − y2n2ntwo nodes
neg−x2n2ntwo nodes
×x · y1n3n1n positive (F16fn) / 3n general
÷x / y2n3n2n positive / ≥3n general
abs|x|2n2nELC-boundary op
sinsin(x) = (eⁱˣ − e⁻ⁱˣ) / (2i)3n3ncomplex Euler bypass
coscos(x) = (eⁱˣ + e⁻ⁱˣ) / 23n3ncomplex Euler bypass
tantan(x) = sin(x) / cos(x)4n4ncomposite — cos can be 0
sinhsinh(x) = (eˣ − e⁻ˣ) / 23n3nELC-preserving (T_HYP_ELC_PRESERVE)
coshcosh(x) = (eˣ + e⁻ˣ) / 23n3nELC-preserving
tanhtanh(x) = sinh(x) / cosh(x)4n4ncomposite
softplussoftplus(x) = ln(1 + eˣ)1n1n1 node via LEAd operator
sigmoidσ(x) = 1 / (1 + e⁻ˣ)4n4nneg + exp + add + recip
SiLUx · σ(x)7n7nσ = 4n + free-var mul = 3n
KL termλ · ln(λ/μ)5n5nvia D_F13(λ, λ/μ) — avoids free-var mul
gaussianexp(−(x − μ)² / (2σ²))4n4nsub + pow + div + exp
Bures√(λμ) with λ,μ > 02n2npositive mul=1n + EPL=1n