How a single binary operator — eml(x,y) = exp(x) − ln(y) — can generate every elementary function a scientific calculator knows, from addition to trigonometry.
When I first read this paper, what immediately caught my attention was a specific question: does the uniform tree structure reveal an opportunity for computer algebra systems — something that could help solve integrals or differential equations algebraically? I built the playground at the bottom of this article to develop some intuition. I haven't found anything obvious yet, but the investigation itself was interesting enough to write up.
In digital electronics, a single two-input gate — NAND — is all you need. Every Boolean circuit in every chip ever made can be built from nothing but NAND gates. No AND, no OR, no XOR: just the one primitive, repeated.
For continuous mathematics no such primitive was known. A scientific calculator needs dozens of buttons: addition, subtraction, multiplication, division, exponentiation, square root, sine, cosine, logarithm… They feel irreducibly diverse.
Until now.
The EML Operator
In a 2026 paper, Andrzej Odrzywołek (Jagiellonian University) showed that a single binary operator
together with the constant 1, generates the full repertoire of a scientific calculator. Every elementary function — every constant, every arithmetic operation, every transcendental — can be written as a nested tree of eml calls applied to 1 and the input variables.
That includes: , , , integers, rationals, radicals, , , , , exponentiation, , , , , , , , , , , , … all of them.
The Simplest Identities
The most immediate identity is exponential:
because . From there the Euler number follows immediately:
The natural logarithm is only one level deeper:
You can verify this by expanding from inside out:
A Uniform Grammar
Once you have exp and ln, the standard arithmetic and transcendental functions follow by bootstrapping:
| Expression | EML depth | Notes |
|---|---|---|
| 1 | eml(x, 1) | |
| 3 | see above | |
| 3 | ||
| 5 | via | |
| 7 | via | |
| 9 | via | |
| ≈ 13 | via |
The key structural insight: every elementary expression becomes a binary tree of identical nodes. The grammar could not be simpler:
This is a context-free language isomorphic to full binary trees (Catalan structures). There are no heterogeneous node types, no special cases — just one repeated element, exactly like a digital circuit built from NAND gates.
Why It Works
EML bundles the two fundamental operations of the exp-log world — exponentiation and logarithm — into a single asymmetric gate:
- The left input passes through
- The right input passes through
- The outputs are subtracted
The non-commutativity is essential: it provides both "tree growth" (exp inflates, ln deflates) and inversion capability (swapping inputs inverts the sense of the operation).
EML is not unique. Close cousins exist: EDL (with constant ) and (with constant ). The paper also hints at a ternary variant that requires no distinguished constant at all.
Discovery: Exhaustive Search
The result was not guessed — it was found by systematic exhaustive search. Odrzywołek built a bootstrapping verifier (VerifyBaseSet) that, starting from a candidate primitive set, repeatedly searches for expressions that compute each target operation, growing the known set until all 36 primitives in his scientific-calculator basis are covered.
The search proceeds iteratively:
- Start with and target list
- Find any expression over that equals some target in
- Move it from to
- Repeat until
A Rust reimplementation runs the full check in ~35 seconds (vs ~40 minutes in Mathematica). The code is open-source at VA00/SymbolicRegressionPackage.
An Analog Circuit Perspective
The authors also note a hardware angle. An eml gate can be built from two analog components (an exp-amplifier and a log-amplifier) and a subtractor. Since every elementary function is a tree of identical gates, you can implement any mathematical function in analog hardware using a single type of circuit element — a continuous analogue of building digital circuits from transistors.
EML for Symbolic Regression
The uniform tree structure has a machine-learning payoff. In standard symbolic regression, the search space mixes heterogeneous operators (sin, cos, +, exp, …). With EML, the search space is parameterized by a single architecture:
At each internal node, the two inputs are soft-gated linear combinations of 1, the variable , and the node's children. Gradient descent (Adam) can then train these parameters continuously. When the generating law is elementary, the weights can "snap" to exact rational values, recovering the closed-form formula exactly.
The authors demonstrate exact recovery of formulas like , , , and from numerical data, at tree depths up to 4.
Applications: CAS, Integration, and Differential Equations?
The uniform tree grammar raises an intriguing question: could EML serve as a canonical representation inside a computer algebra system?
Today's CAS tools (Mathematica, SymPy, Maple) maintain a heterogeneous internal AST with dozens of node types — Add, Mul, Pow, Exp, Sin, and so on. Every transformation rule must handle the full combinatorial cross-product of node pairs. EML collapses that zoo into a single node type. In principle:
- Pattern matching becomes structurally uniform — every rewrite rule operates on the same shape of tree.
- Integration might benefit: an indefinite integral could be searched as a tree of bounded depth, since the antiderivative of an elementary function is (when it exists) also elementary. The EML search algorithm Odrzywołek used to rediscover the operator could be adapted here.
- ODEs: the solution landscape of elementary ODEs is similarly constrained. A depth-bounded search over EML trees could, in theory, enumerate candidate closed-form solutions.
None of this is proven, and the trees grow quickly in depth — already takes ~41 nodes. But the idea is at least coherent in a way it never was with a heterogeneous operator set.
Differentiation as a Graph Transformation
My main motivation for building the playground was to look at how the EML tree changes under differentiation. The question I kept asking was: if and share large substructures in EML form, does that tell us something useful? Could a CAS exploit it — recognising that parts of the derivative are literally subtrees of the original function, and reusing them rather than recomputing?
To explore this I built a simple shared-subgraph detector. Take and as EML trees, run this algorithm, and see what they have in common:
- Canonicalise every subtree as a string key via a bottom-up structural hash: a leaf
1maps to"1", a variablexmaps to"x", and any internal node maps to"(L|R)"whereLandRare the keys of its children. - Count how many times each unique key appears in , and separately in .
- Intersect the two multisets: any key present in both trees corresponds to a shared subtree.
- Filter for size ≥ 2 (isolated leaf matches are trivial) and rank by node count — larger shared structures first.
The playground runs this live — switch to the Shared tab after differentiating to see the largest common subgraph highlighted in both trees, with a ranked table below.
The results are interesting but I haven't found an obvious practical application yet. The sharing is often large (the chain rule predictably re-uses subexpressions from inside ), but translating that structural observation into a CAS algorithm for, say, solving an ODE symbolically is a much harder step that I haven't cracked.
Interactive Playground
Try it yourself. Type any elementary expression below and see it compiled into pure EML form, along with a rendering of the binary tree.
Supported syntax: exp(x), ln(x), log(x), sqrt(x), cbrt(x), sinh(x), cosh(x), tanh(x), x + y, x - y, x * y, x / y, x ^ y, eml(x, y), inv(x), neg(x), pow(x, y).
EML Playground
Compile and differentiate math expressions in pure eml(x,y) = exp(x) − ln(y) form.
EML form:
eml(1, eml(eml(1, x), 1))Binary tree (E = eml node, 1/var = terminal)
Note that sin() and cos() produce EML trees over (they require ) and are not shown here — the compiler flags them with an explanation. The hyperbolic variants sinh, cosh, tanh work entirely over the reals and compile cleanly.
Significance
For centuries the scientific-calculator basis felt irreducibly complex. We knew many reductions (e.g. , ) but a single sufficient primitive seemed impossible. EML shows the reduction goes all the way.
This is more than a mathematical curiosity. It reveals that:
- Elementary functions form a far simpler class than previously recognised
- A uniform, grammar-regular search space for symbolic regression exists
- Analog computing can be built from a single reusable element
The paper ends with open questions — most tantalizingly, the existence of a binary operator that generates all constants from arbitrary input (no distinguished terminal needed), and of a unary operator that retains all good properties of neural-net activations while enabling exact elementary-function evaluation.
Further Reading
- Odrzywołek, A. (2026). All elementary functions from a single operator. arXiv:2603.21852
- Source code: VA00/SymbolicRegressionPackage (Zenodo DOI: 10.5281/zenodo.19183008)
- Sheffer, H.M. (1913). A set of five independent postulates for Boolean algebras. (the original NAND paper)
Related Articles
Automatic Differentiation
A deep-dive into automatic differentiation: symbolic vs. numerical vs. AD, AST transformation, dual numbers, tapes, hybrid methods, and a generic C++ implementation that computes gradients and solves optimisation problems.
The Fourier Transform: From Sines to Signals
A visual and mathematical journey through one of the most beautiful ideas in all of mathematics — decomposing any signal into its frequency components.
Why Tuning a Piano is Mathematically Impossible
Perfect harmony is a mathematical impossibility. Here's the beautiful, maddening reason why — and how piano tuners have learned to live with it.