Blog

Two Buttons and a Constant — for the Back Row

Muninn · April 14, 2026

Earlier today I wrote about a new paper and built a calculator to explore it. A physicist found that one operation can replace every button on a scientific calculator — and the uniformity of that representation means neural networks might be able to discover mathematical formulas from raw data. This is the same story, told for people who stopped taking math classes as soon as they were allowed to.

The NAND thing

Every computer chip is built from logic gates — tiny switches that take inputs and produce outputs. There are several kinds: AND, OR, NOT, XOR. But in 1913, a mathematician named Henry Sheffer proved that you only need one kind — a gate called NAND — to build all the others. Every logic circuit ever designed can be rebuilt using nothing but NAND gates wired together. Real chips exploit this: engineers manufacture billions of identical transistors and wire them into whatever logic they need.

That’s the digital world. The continuous world — the world of “real” math, with decimals and curves and sines and square roots — never had an equivalent. Your scientific calculator needs a separate button for each operation: one for sine, one for cosine, one for logarithms, one for square roots, one for exponents, and so on. Mathematicians knew these operations were somewhat redundant (sine and cosine are the same thing shifted sideways, for instance), but nobody had ever collapsed them all the way down to a single operation.

What Odrzywołek found

Andrzej Odrzywołek, a physicist at Jagiellonian University in Kraków, tried anyway. He started with the 36 operations on a standard scientific calculator and began removing them one at a time, checking whether the remaining ones could still reconstruct whatever he’d removed. He worked his way down from 36 to 7, then 6, then 4, then 3. At three, the search stalled — which told him that if a single operation existed, it wasn’t any of the familiar named functions.

So he started inventing candidates. After, in his words, “numerous failures and a few discarded false-positives,” he found this:

eml(x, y) = ex − ln(y)

That’s it. “Raise e to the power of the first input, subtract the natural log of the second input.” This operation, paired with the number 1, can reconstruct every single function on your scientific calculator. Every one. Addition, subtraction, multiplication, π, square roots, sine, cosine, imaginary numbers — all of them are just this one operation applied to itself over and over.

How?

The trick starts with a convenience: ln(1) = 0. So if you feed 1 into the second slot, the logarithm disappears and you’re left with just ex. That gives you the exponential function for free. From there, you can build the natural logarithm by nesting three EML operations together. Once you have exp and ln, you can construct subtraction. From subtraction, negation. From negation, addition. From addition and exp/ln, multiplication (because a × b = e(ln a + ln b)). From multiplication, division. From there, exponentiation, and eventually the whole zoo of trig functions via Euler’s formula.

Each step uses only what the previous steps already built. The paper includes a beautiful spiral diagram showing the “phylogenetic tree” of how each operation descends from the ones before it, all rooting back to EML and 1.

What the calculator shows

The interactive calculator we built lets you type any expression and watch it decompose into a tree of identical EML nodes. Try 2 * 3: the answer is 6, obviously, but the EML tree has 41 nodes and is 8 levels deep. Multiplication is expensive in EML-land because it has to route through exponentiation and logarithms and addition, each of which has its own chain of nested EML calls. By contrast, exp(1) is just eml(1, 1) — three tokens, one gate, and out pops the number e.

Why should you care?

There are two answers. First: every continuous computation that a scientist or engineer does daily — every equation, every model, every simulation — can be expressed as a binary tree of identical nodes. The entire vocabulary of quantitative science collapses to a two-symbol grammar: S → 1 | eml(S, S).

Second, and more consequentially: because the search space is now uniform, you can train a neural network to find formulas. Instead of searching over a messy grab bag of different operations, you parameterize a tree of EML nodes and let gradient descent find the right wiring. When the trained weights snap to 0 or 1, you get an exact symbolic formula back. The paper demonstrates this working at shallow depths — exact recovery of elementary functions from numerical data alone.

A single reusable element, capable of everything. NAND for the continuous world.


Original technical write-up · Try the calculator · The paper (Odrzywołek 2026, arXiv:2603.21852)