A while back I came across a paper on arXiv that stopped me dead in my tracks
The title was unassuming: All elementary functions from a single operator. The author is Andrzej Odrzywolek, a theoretical physicist at Jagiellonian University in Poland, and what he found is this:
A single binary operator eml(x, y) = exp(x) − ln(y), together with the constant 1, can construct every function on a scientific calculator
sin, cos, tan, log, sqrt, addition, subtraction, multiplication, division, exponentiation, inverse trig, hyperbolic functions, all of them
This is essentially saying that the 36 buttons on your scientific calculator? You only actually need 2
Why this is non-trivial
Anyone who’s taken a digital logic course knows about the NAND gate. In the world of Boolean logic, NAND is a “universal gate”: AND, OR, NOT, XOR… every logical operation can be built from NAND alone. This is the foundation of digital circuits and the reason a chip can use a single transistor structure to build arbitrarily complex logic
But in the world of continuous mathematics, nobody had ever found anything like this
We’ve long known that many functions are redundant: tan = sin/cos, √x = x^(1/2), sinh and cosh can be expressed through exp, and Euler’s formula unifies trigonometric and exponential functions. Historically, the invention of logarithms reduced multiplication to addition, and Euler’s formula further established exp and ln as the core primitives. But once you reduce everything down to exp and ln, that’s where it always stalled
For centuries, nobody took it one step further
What Odrzywolek did was use systematic exhaustive search to whittle down the 36 basic elements of a scientific calculator (constants, functions, operators) step by step: from 36 to Wolfram Mathematica’s 7, then to 6, 4, 3, and finally down to just 2: one operator EML, one constant 1
How EML works
The definition is almost absurdly simple:
$$\text{eml}(x, y) = e^x - \ln(y)$$
A few intuitive examples:
- e = eml(1, 1), because e¹ − ln(1) = e − 0 = e
- exp(x) = eml(x, 1), because eˣ − ln(1) = eˣ
- ln(x) = eml(1, eml(eml(1, x), 1)), and this is where it starts getting counterintuitive
By the time you reach multiplication and trigonometric functions, EML expressions can be 8 layers deep or more. The paper includes a complete derivation chain (Figure 1) that builds upward from eml and 1: e → exp → ln → 0 → −1 → minus → i → π → addition → subtraction → multiplication → division → exponentiation → all trigonometric functions
The grammar for the entire chain is breathtakingly simple: S → 1 | eml(S, S). That’s it. A single context-free grammar generates every elementary mathematical function
The search process itself is fascinating
The paper includes a small example that perfectly illustrates why problems like this can’t be solved by intuition alone
Suppose you only have three operations: suc(x) = x + 1, pre(x) = x − 1, inv(x) = 1/x. How do you compute −x?
The answer:
$$\text{suc}(\text{inv}(\text{pre}(\text{inv}(\text{suc}(\text{inv}(x)))))) = -x$$
Depth-5 nesting, completely counterintuitive. The EML construction process is full of expressions like this with Kolmogorov complexity between 7 and 9, utterly impossible to arrive at through human intuition alone
Odrzywolek’s approach is hybrid: first substitute algebraically unrelated transcendental constants (like the Euler-Mascheroni constant) into variables, use numerical computation to screen candidate formulas, then verify with symbolic computation. The whole search was initially implemented in Mathematica, then translated to Rust using GPT Codex, achieving a three-orders-of-magnitude speedup
Why I think this matters enormously for quantitative trading and deep learning
This is what I really want to talk about
Symbolic regression: discovering exact formulas from data
There’s a core problem in quantitative trading and scientific modeling: you have a pile of data and you want to find the exact mathematical formula behind it. This is the domain of symbolic regression
Traditional symbolic regression methods, whether genetic algorithms or more modern approaches, all face a fundamental difficulty: the search space is heterogeneous. You need to simultaneously search for which operators to use (+, −, ×, sin, log…) and how to combine them, making the search space both enormous and irregular
EML completely changes the game
Because every elementary function can be expressed through the same operator, the search space becomes a homogeneous binary tree. Every node is eml, every leaf is either 1 or an input variable x. You don’t need to decide “should this be sin or log”; you only need to determine the tree structure and the value at each leaf
More crucially, this tree is differentiable. The paper demonstrates a “master formula” concept: at each input position in the tree, place a linear combination αᵢ + βᵢx + γᵢf, where α, β, γ are trainable parameters, then run gradient descent with Adam optimizer. After training, snap the weights to the nearest 0 or 1 to recover an exact symbolic expression
The experimental results show that on depth-2 trees starting from random initialization, 100% of experiments recover the correct formula. Depth 3-4 achieves about 25%, and depth 5+ gets quite difficult. But here’s the key point: when you start near the correct solution, even depths 5 and 6 converge back 100% of the time. This means the correct basin of attraction exists; the problem is just how to find it
What this means for quantitative trading
In quantitative trading we constantly need to extract predictive factors or formulas from market data. The traditional approach is either manual factor construction (relying on domain knowledge and intuition) or black-box machine learning models (effective but uninterpretable)
EML offers a middle path: using gradient descent to search for exact mathematical formulas
Imagine feeding price series, volume, volatility and other data into an EML tree. After training, what you get isn’t an opaque neural network weight matrix, it’s a mathematical formula that can be written in closed form. You can directly examine the mathematical structure of the factor, understand why it works, and judge whether it’s overfitting or genuinely capturing some market regularity
The value this brings to risk management and model auditing is immense
What this means for deep learning
The paper makes a brilliant observation: any conventional neural network is a special case of an EML tree
Because standard activation functions (ReLU, sigmoid, tanh…) are themselves elementary functions, any neural network built with these activations can theoretically be expressed as an EML tree. But the reverse doesn’t hold: EML trees can express things that conventional neural networks cannot
More importantly, there’s interpretability. After training a conventional neural network, what you get is a pile of floating-point weights that nobody can extract physical meaning from. But after training an EML tree, if the weights can be snapped to exact values, what you get is a readable mathematical formula, a form of interpretability that conventional architectures fundamentally cannot provide
In the paper’s own words:
When this succeeds, the discovered circuits are legible as elementary function expressions — a form of interpretability unavailable to conventional architectures.
Open questions
What excites me most about this paper is actually what it hasn’t solved yet
EML requires a specific constant 1 as a starting point. NAND gates don’t; they can generate 0 and 1 from arbitrary inputs. So is there a continuous binary operator that can generate all elementary functions without any specific constant? Odrzywolek is looking for one. He’s already found a ternary version T(x, y, z) = eˣ/ln(x) × ln(z)/eʸ, satisfying T(x, x, x) = 1, but full verification is still underway
Another question: is there a unary Sheffer, that is, an activation function that can both serve in a neural network like ReLU and exactly compute all elementary functions? If such a thing exists, the entire landscape of deep learning architecture design could be rewritten
Final thoughts
This paper reminds me of how I felt when I first read about twelve-tone equal temperament. On the surface it’s a pure mathematical discovery, but what it touches is a deeply fundamental structural question: the world we thought required many different tools to describe might only need one
From 36 buttons to 2 buttons: this isn’t just a mathematical parlor trick. It reveals that the redundancy among elementary functions far exceeds what we ever imagined, and once that redundancy is properly exploited, it opens up entirely new computational paradigms
The paper’s arXiv ID is 2603.21852. Code and verification tools are open-sourced on GitHub. If you’re interested in symbolic regression or mathematical foundations, this one is worth reading end to end
Three months later (updated 2026-07-04)
I kept following this operator after the post went out, half expecting a niche pure-math topic to go quiet. Instead, within three months it grew a whole ecosystem: follow-up theory, a machine-checked proof, two application papers, and one serious rebuttal
One thread at a time
Why it works: there’s an answer now
Odrzywolek found EML by brute-force search. The search succeeded, but it never answered the deeper question: why this operator?
In late April, Tomasz Stachowiak supplied the answer (arXiv:2604.23893): EML carries two ingredients at once, an abelian group structure and functional inversion, and it’s that pairing that generates all the function families. An operator that was stumbled upon now has an algebraic skeleton you can actually read
A Lean formalization that caught a bug in the paper
The most hardcore follow-up is a project called eml-lean: all 36 primitives formally verified in Lean 4, across 32 files
Along the way it caught a real bug: a lemma extended from the original paper is false, with a counterexample at p=2, k=0, and it only holds after adding a modularity hypothesis. This is exactly what formalization is for: what a human eye skims past, Lean won’t
Stranger still, the project wandered from things like exp(x) + ln(x) into analytic number theory and modular forms (Hecke operators). A calculator-operator toy wiring itself into number theory has to be the least predicted branch of this whole story. The R ecosystem picked it up too (emlR)
The first applications, with a bucket of cold water
Someone put EML inside a hybrid neural network (arXiv:2604.13871): a standard DNN trunk with a shallow EML “symbolic head” on top, aimed at safety-critical automotive edge computing: EV powertrains, ISO 26262 certification
The cold water comes from the paper itself: an EML node costs ~111 FLOPs against 1–30 for a standard activation, so nothing gets faster on CPU/GPU, and the gains only arrive with custom FPGA or analog cells. It also measured recovery rates: 100% at depth 2, under 1% at depth 5. The depth ceiling now has experimental numbers attached
Another group applied EML to battery characterization (arXiv:2604.13873). Both are proof-of-concept, but hands are on the thing now
What machine learning does with it
Back in April, the most I could say was that it “might” help interpretability. Three months later there are three concrete things to point at
Symbolic regression actually runs now. The eml-sr project turns the homogeneous-differentiable-binary-tree idea into working code: ln(x) recovered to machine epsilon (7.3e-17 RMSE), exp(x) perfect at depth 1, sklearn-compatible interface included. “Search for closed-form formulas by gradient descent” is no longer just talk
Interpretability went from slogan to design. The DNN-EML hybrid has an MLP trunk extract features z, an EML tree sits on top as the symbolic head with affine leaves αᵢ + βᵢᵀz + γᵢ·f, and hardening the weights toward {0,1} after training snaps the whole head into a human-readable formula. The family is even proven dense in C(K,ℝ): universal approximation kept, legible head thrown in for free
Put it next to KAN and you can see what makes EML different. Kolmogorov-Arnold Networks lean on learnable splines along their edges, with a hand-curated primitive library and heterogeneous hardware; EML is one Sheffer cell, universality comes free from the math, and on FPGA a single cell implements any elementary function with no per-activation lookup tables. That hardware uniformity is something KAN can’t offer
“Rule them all” needs an asterisk
The opposition showed up too, and it lands
stylewarning wrote Not all elementary functions can be expressed with exp-minus-log, pointing out that “all elementary functions” only holds under Odrzywolek’s own 36-symbol calculator definition. Under the rigorous definition mathematicians have used since the 19th century, EML cannot express arbitrary polynomial roots; the generic quintic is the counterexample
The proof runs through Khovanskii’s topological Galois theory: every EML term has a solvable monodromy group, the generic quintic’s is the unsolvable S₅, contradiction. Strictly speaking, EML expresses a proper subset of the elementary functions
So this post’s title, “One Operator to Rule Them All”, rules the 36 buttons of a scientific calculator, not every elementary function in the mathematical sense. The original paper does state the caveat; April me was too excited to put it on the table
There’s a trap here worth flagging: this “quintic” has nothing to do with the “depth 5” over in symbolic regression; the two 5s are pure coincidence. Depth 5 is a soft wall: the correct tree exists and computes fine, gradient descent just can’t find it from a random start, and a better optimizer or a start near the solution converges 100% of the time; it’s “hard to find”. The quintic root is a hard wall: no depth expresses it, ever; this is the 1824 Abel–Ruffini “no formula in radicals” story, and adding exp and ln doesn’t buy it back; it “doesn’t exist”. One is an optimization problem, the other is expressibility
Three months in
Theory, a proof, applications, a rebuttal: for a niche pure-math topic to run that full lap in three months is fast. Practically, though, the “wow” is still pinned by two things: the depth-5 ceiling in symbolic regression, and zero speed advantage on commodity hardware. EML today is still more elegant than useful
If anything, the branch running from a calculator operator all the way to modular forms may be the most unexpected part of the whole story. I’ll keep following it
Postscript: I joined in
All this following-along made my hands itch, so I ported my own April Python implementation, emltree, to a zero-dependency JS version and published both. Until now there wasn’t a single EML package on npm, so that spot is mine
- Python:
pip install emltree - JS:
npm install emltree, with annpx emltreeCLI: formula in, EML tree out
The best part: the port replayed the eml-lean story in miniature. The moment the JS test suite ran, it caught a bug that had lived in the Python original for three months: I had written the atan identity as (i/2)·ln((i−x)/(i+x)), which is identically −atan(x); the correct form is (i+x)/(i−x). The old tests only covered sin/cos/tan, so it sat there untouched. Cross-checking one implementation against a second is the same act as formalizing a paper in Lean, at a different strength. Rewriting it in another language is the cheapest formalization there is
Links
Papers and projects mentioned in this post:
- Original paper: Andrzej Odrzywołek, All elementary functions from a single binary operator · arXiv:2603.21852
- Algebraic structure: Tomasz Stachowiak · arXiv:2604.23893
- Neuro-symbolic hardware (DNN-EML hybrid) · arXiv:2604.13871
- Battery characterization · arXiv:2604.13873
- Lean 4 formalization · tomdif/eml-lean
- R implementation · pjt222/emlR
- Symbolic-regression engine · oaustegard/eml-sr
- Kolmogorov-Arnold Networks · arXiv:2404.19756
- The rebuttal: Not all elementary functions can be expressed with exp-minus-log · stylewarning.com
- My implementations: emltree · GitHub · PyPI · npm