one operator. every elementary function.

A single binary primitive, eml(x,y)=exp(x)ln(y)\operatorname{eml}(x, y) = \exp(x) - \ln(y), paired with the constant 11, is enough to rebuild the entire toolbox of a scientific calculator. Notes, decompositions, and implications, written for people who find this kind of thing fun.

i was just curious when i came across this paper, after all, its something like NAND for the mathematics.

out of curiosity i researched more about it and ended few shotting a basic webapp describing a few ideas explored by LLM itself and a playground.

i had this intuition that maybe a new ISA and chip design can be developed using this. but it also has problems of its own. also got to know about potential of this paper in tracing during LLM development for some things, but its also like walking through the quicksand. maybe in near future some missing piece will be added to this paper, and a whole new possibilities and innovation will arise. but its all a big maybe. because here we are not talking about some patch in a software. we are talking about the very foundations of most complex tech pieces ever built. even if we get to build something efficient, it will be long long time till it gets accepted somewhere.

Overview

Boolean logic has a single-primitive result: every possible truth function can be synthesized from NAND alone. NAND is the Sheffer stroke for classical logic. What continuous mathematics had been missing was an analogous primitive: a single operator from which all of the usual elementary functions could be composed.

Odrzywołek's 2026 paper nominates one. The operator

eml:R×R+R,eml(x,y)=exp(x)ln(y)\operatorname{eml} : \mathbb{R} \times \mathbb{R}_{+} \to \mathbb{R}, \qquad \operatorname{eml}(x, y) = \exp(x) - \ln(y)

together with the single literal 11, is proven to generate every elementary function. That's it. No ++, no ×\times, no trigonometric identities in the axioms, only eml\operatorname{eml} and 11, nested into binary trees.

A scientific calculator ships with around thirty-six labeled operations (exp, ln, sin, cos, +, , ×, ÷, π, e,   , x2, xy, \exp,\ \ln,\ \sin,\ \cos,\ +,\ -,\ \times,\ \div,\ \pi,\ e,\ \sqrt{\;},\ x^{2},\ x^{y},\ \dots). The paper reduces that alphabet, one item at a time, to two primitives. Five stages, each smaller than the last:

Calc 3 → 6 primitives
Calc 2 → 4 primitives
Calc 1 → 3 primitives
Calc 0 → 3 primitives
EML    → 2 primitives   ← eml, 1

The rest of this page unpacks what that actually means, why it is not merely a curiosity, and what doors it opens.

Plain-English intuition

Think of eml\operatorname{eml} as a small machine with two inlets and one outlet. Pour a number into the left inlet, another into the right, and the machine spits out exp(left)ln(right)\exp(\text{left}) - \ln(\text{right}). The two inlets are not interchangeable, exp\exp is applied to the first, ln\ln to the second. The machine is non-commutative, which matters: every tree you can build has a definite shape.

Now restrict yourself further: the only raw ingredient you're allowed to drop into the inlets is the number 11, or the output of another eml\operatorname{eml} machine. You may plumb machines into each other without limit. That is the entire grammar:

S    1    eml(S,S)S \;\to\; 1 \;\mid\; \operatorname{eml}(S, S)

Surprisingly, this skeletal grammar is expressive enough to reconstruct every function on your calculator. Euler's number ee is not a separate primitive, it is the one-node expression eml(1,1)=exp(1)ln(1)=e\operatorname{eml}(1, 1) = \exp(1) - \ln(1) = e. The function exp(x)\exp(x) becomes eml(x,1)\operatorname{eml}(x, 1), because ln(1)=0\ln(1) = 0 cancels the second term. From there you stack trees to recover everything else.

The operator is tiny. The expressive power sits in how trees compose, not in the number of symbols in the alphabet.

The NAND analogy

Every CS student meets NAND at some point. It's the two-input Boolean gate with the following truth table:

A  B | NAND(A, B)
0  0 |     1
0  1 |     1
1  0 |     1
1  1 |     0

NAND is functionally complete: given enough NAND gates wired correctly, you can realize AND, OR, NOT, XOR, a half-adder, a CPU. The reason this matters is less about elegance and more about engineering leverage. You only have to design, fabricate, and reason about one gate. Testing is simpler. Lithography masks are simpler. Formal verification is simpler.

EML is the continuous-mathematics counterpart. Where NAND reduces all Boolean circuits to a single two-input gate, eml\operatorname{eml} reduces all elementary functions to a single two-input operator. The analogy is precise enough to carry real intuition:

  • NAND's truth table ↔ eml\operatorname{eml}'s defining formula exp(x)ln(y)\exp(x) - \ln(y).
  • Boolean circuit = tree of NAND gates ↔ elementary function = tree of eml\operatorname{eml} nodes.
  • Gate count / circuit depth ↔ tree size / tree depth (complexity metrics).
  • NAND's fabrication leverage ↔ EML's hardware potential on exp\exp/ln\ln-native substrates.

The analogy is imperfect in one important way. NAND lives over a finite domain (two bits), so completeness is a constructive fact you can verify by enumeration. EML lives over the reals, and "every elementary function" is a much larger claim than "every Boolean function." The paper discharges it symbolically.

Worked examples

The fastest way to get the feel of EML is to read a handful of trees. Here are five verified decompositions, from trivial to not. Each eml(a,b)\operatorname{eml}(a, b) below is literally exp(a)ln(b)\exp(a) - \ln(b).

e, depth 1

e  =  eml(1,1)  =  exp(1)ln(1)  =  e0  =  e\begin{aligned} e \;&=\; \operatorname{eml}(1, 1) \\ \;&=\; \exp(1) - \ln(1) \\ \;&=\; e - 0 \\ \;&=\; e \end{aligned}

Euler's number costs one eml\operatorname{eml} node. It is never an axiom here; it falls out of the operator for free.

exp(x), depth 1

exp(x)  =  eml(x,1)  =  exp(x)ln(1)  =  exp(x)0\begin{aligned} \exp(x) \;&=\; \operatorname{eml}(x, 1) \\ \;&=\; \exp(x) - \ln(1) \\ \;&=\; \exp(x) - 0 \end{aligned}

The exponential function is one node deep. ln(1)=0\ln(1) = 0 silences the right branch.

0, depth 3

0  =  eml(1,  eml(eml(1,1),  1))  =  exp(1)ln(exp(e)0)  =  ee  =  0\begin{aligned} 0 \;&=\; \operatorname{eml}\bigl(1,\; \operatorname{eml}(\operatorname{eml}(1, 1),\; 1)\bigr) \\ \;&=\; \exp(1) - \ln\bigl(\exp(e) - 0\bigr) \\ \;&=\; e - e \\ \;&=\; 0 \end{aligned}

The constant zero is not free. It takes three levels of nesting, because we have to build the cancellation using only 11 as a literal.

ln(x), depth 3

ln(x)  =  eml(1,  eml(eml(1,x),  1))\ln(x) \;=\; \operatorname{eml}\bigl(1,\; \operatorname{eml}(\operatorname{eml}(1, x),\; 1)\bigr)

The natural log, the operator's own inverse component, lives three levels deep. This is the depth-3 form from the paper's main table.

identity: f(x) = x, depth 4

x  =  eml(1,  eml(eml(1,  eml(x,1)),  1))  =  ln(exp(x))\begin{aligned} x \;&=\; \operatorname{eml}\bigl(1,\; \operatorname{eml}(\operatorname{eml}(1,\; \operatorname{eml}(x, 1)),\; 1)\bigr) \\ \;&=\; \ln(\exp(x)) \end{aligned}

Even the identity function costs four nested eml\operatorname{eml} calls, a reminder that the EML tree depth of a function has very little to do with how "simple" it looks in school-book notation.

From the paper's Table 4, here are depths for a few of the usual suspects:

exp       : depth 1
e         : depth 1
negate    : depth 2
reciprocal: depth 2
ln        : depth 3
subtract  : depth 4
add       : depth 5
divide    : depth 7
multiply  : depth 8

Multiplication being deeper than division is the kind of fact that rewires your sense of what "elementary" means. In EML, operator depth is the honest measure, not familiarity.

You can play with any of these (and build your own) in the playground.

Use cases

"Reducing math to one operator" reads like a parlor trick until you consider what a single primitive actually does for downstream engineering. A short tour of where this matters:

Symbolic regression

Symbolic regression systems search over expression trees to fit data. The search space is usually indexed by the grammar of allowed operators, typically +, , ×, ÷, exp, ln, sin+,\ -,\ \times,\ \div,\ \exp,\ \ln,\ \sin, and so on. A space with one operator is dramatically smaller, more uniform, and easier to enumerate. Depth becomes a single honest complexity penalty.

Analog / log-domain hardware

Analog computing substrates that implement exp\exp and log\log natively (log-domain filters, translinear circuits, some photonic systems) already like the ingredients of EML. If your physics gives you exp\exp and ln\ln cheaply, then every elementary function is a wiring problem, not a new piece of silicon.

Compilers and IR

Intermediate representations over a minimal operator set are easier to reason about: every pass, pattern-match, and rewrite rule only has to cover one operator. EML suggests a canonical normal form for elementary expressions, useful for equivalence checking, superoptimization, and as a teaching target.

Teaching

The cleanest pedagogical benefit: EML lets students see that exp and ln are not two functions but a single dual, and that the entire calculator is a binary tree of that dual. It's the kind of thing that collapses scattered memorized rules into one idea.

ML interpretability

Neural networks learn implicit compositions of exp\exp and ln\ln whenever they use softmax, log-sum-exp, or attention. Framing those learned compositions as EML trees gives a handle on what the network is computing at a level of abstraction that is strictly finer than "matmul + nonlinearity."

Could we build a chip on it?

Once you accept that the EML operator is functionally complete, the obvious next thought is hardware. If NAND-only logic gave us the modern CPU, would EML-only silicon give us a leaner scientific calculator, or a leaner anything? This question turns out to be genuinely subtle, and worth working through, because the answer tells you something about why ISAs are shaped the way they are.

1. Is an EML-only calculator more efficient than a conventional one?

Short answer: almost certainly no. The NAND analogy hides a load-bearing detail. NAND wins because it has two properties, functional completeness and a cheap primitive (≈4 transistors in CMOS) plus bounded expansion (every Boolean function maps to a NAND circuit of comparable size). EML has only the first.

Per-gate cost in silicon is brutal here. ADD is roughly one cycle and a tiny area; MUL is 3–5 cycles. exp\exp and ln\ln each take ~15–30 cycles and large area (LUT + polynomial, or CORDIC). One EML node is therefore exp + ln + sub, on the order of 30–60 cycles. Now overlay the depths from Table 4: a multiply is depth 8, so an EML-multiply is roughly 8×60480 cycles8 \times 60 \approx 480 \text{ cycles} with 16 transcendentals chained, versus 4 cycles for a conventional MUL. That's a ~100× slowdown and orders of magnitude more area for a single op.

Numerical stability is the second knife. Every EML node stacks an exp\exp over a ln\ln; a depth-8 multiply composes 16 transcendentals, each injecting roughly one ULP of error. IEEE-754 add/mul guarantees 0.5 ULP. EML-composed multiply has no such bound. So an EML calculator wouldn't just be slower; it would be less accurate than the $2 microcontroller it was trying to replace.

2. Does that change if we redesign the chip and the ISA?

Still no, and there's a 50-year research tradition that tells us why. What you'd be building is a flavor of One Instruction Set Computer (OISC), a CPU with a single primitive instruction. Real examples exist: SUBLEQ ("subtract and branch if less-equal"), Transport-Triggered Architectures, Logarithmic Number System chips. All Turing complete. All 10×–1000× slower than conventional CPUs on real workloads. EML-on-silicon would inherit the same fate.

The argument "but if we co-design the whole stack" assumes the bottleneck is impedance mismatch between ISA and hardware. It isn't. The bottleneck is the physics of the primitive:

  • add\mathrm{add} needs a carry-propagate network. log(n)\sim \log(n) gate delays. No known faster way.
  • exp\exp / ln\ln need range reduction + polynomial / LUT evaluation. Mathematically irreducible: no chip redesign changes the fact that a 53-bit exp\exp requires more work than a 53-bit add.

No silicon arrangement gets you below exp_cost+ln_cost+sub_cost  >  add_cost\mathrm{exp\_cost} + \mathrm{ln\_cost} + \mathrm{sub\_cost} \;>\; \mathrm{add\_cost}. That's a fundamental lower bound, not an engineering limitation. The gains from co-design, simpler decoder, no structural hazards, smaller compiler backend, are real but maybe ~10–20% of total chip cost. You can't co-design your way out of a two-orders-of- magnitude hole with 20% gains.

3. The clean-slate chip lesson

Every clean-slate architecture in the last 30 years, Itanium, Transmeta, the Mill, RISC-V, Apple Silicon, Tenstorrent, still uses ADD/SUB/MUL/FMA as primitives. Not because of legacy, but because physics makes those cheapest. The clean-slate winners (TPU, GPU) won by adding more specialization (matmul units, tensor cores, RT cores, NPUs, AMX, media codecs), not by unifying around a single primitive.

The direction of efficiency in modern hardware is therefore the opposite of EML. More primitives for more workloads, not fewer. EML is a deeply elegant theoretical result and a terrible general-purpose chip.

4. Where EML-native silicon could actually win

Two narrow but real niches:

  • Analog / log-domain circuits. The transistor I-V curve is literally exponential, so exp\exp and ln\ln are essentially free at the device boundary. Translinear circuits, Gilbert cells, log-domain filters, EML primitives fit naturally. Tradeoff: ~8-bit effective precision, unsuitable for IEEE 754, potentially attractive for low-precision ML inference.
  • Workloads that are already mostly transcendentals. Bayesian inference, certain physics simulations, attention variants. If you're paying for exp\exp/ln\ln anyway, the EML pair isn't extra cost. But you'd just expose exp\exp and ln\ln directly, no reason to funnel everything through the EML composition.

The honest summary: completeness is about what's expressible; efficiency is about expansion factor times primitive cost. EML wins the first decisively and loses the second decisively. Beautiful theory; not a chip.

Potential & open problems

The paper proves existence. It does not, for most functions, prove that the decompositions it exhibits are minimal. That gap is where most of the interesting research lives.

  • Optimal depth. Is there a known elementary function whose minimal EML depth is larger than the paper's table suggests? Proving lower bounds on tree depth is a hard problem by analogy with circuit complexity.
  • Canonical forms. Two different EML trees can represent the same function (because ln(exp(x))=x\ln(\exp(x)) = x, etc.). What is the right canonical form? Is there a confluent rewrite system?
  • Numerical stability. exp\exp blows up fast; ln\ln hates non-positive inputs. Evaluating a deep EML tree naively is a recipe for overflow. Are there reformulations, log-domain, interval-arithmetic, mixed precision, that keep the algebra but stabilize the arithmetic?
  • Sheffer-stroke cousins. Are there other two-argument operators over R\mathbb{R} with the same completeness property? If so, which one is "best"?
  • Beyond elementary. Can the idea be extended past elementary functions, to special functions, distributions, operators on Hilbert spaces? The natural Sheffer-stroke question doesn't stop at calculus.

None of this is settled. The playground is the easiest way to build intuition; the paper itself is the right next step once you want the proofs.

end of article

> questions, corrections, better decompositions? this is a learning playground, fork it, break it, send patches.