Exp Minus Log - Andrzej's one operator for Elementary Functions

September 27, 2026

Speaking to another engineer at work about some philosophical topics from René Descartes' Meditations led to him telling me about some universal operator in math from which you could derive other elementary functions/operators. This immediately reminded me of one of my computer engineering classes where my professors showed us how NAND gates can be used to build all other logic gates and thus circuits for computers.

I spent some time looking for such a concept and found All elementary functions from a single binary operator, by Andrzej Odrzywołek, which was released earlier this year.

Being drawn to such elegant ideas, I spent all of this Sunday morning reading and debating with GPT-6 Astra about its implications and derivations, and decided to write this post as a way of thinking deeply about its implications. I suppose the best way to write about this is to connect it back to the idea that popped into my head when my coworker mentioned it. So back to the idea of Boolean logic. You can build every Boolean logic operation from NAND gates.

AND, OR, NOT and the rest may look like separate building blocks, but if you wire together enough NAND gates, NAND is enough.

This paper asks a similar question for the math you would find on a scientific calculator. Do we need addition, multiplication, square roots, logarithms, sine and all the rest as separate operations?

It turns out that one two-input operation and the constant 1 can give us that repertoire. The operation is called EML, for Exp-Minus-Log.

So what is Exp Minus Log?

EML exponentiates its first input, takes the natural logarithm of its second input, and subtracts the results.

My first thought was: this already contains an exponential and a logarithm, so have we really simplified anything? I will come back to that, but first I wanted to understand how the derivations work.

The easiest place to start is 1. Since its logarithm is zero, putting it into the second input gives us:

We have recovered the exponential function. I like thinking of 1 as turning off the logarithm side of the operation. Putting 1 in both inputs also gives us the constant e.

Getting the logarithm back takes a little more work. For positive x, the paper gives:

Rather than trying to memorize this, I found it easier to follow from the inside out. The first EML gives us e minus the logarithm of x, and the next one exponentiates that result:

The final EML takes the logarithm of that and subtracts it from e:

The exponential and logarithm undo each other. This cancellation is the trick that keeps showing up in the construction.

Getting the other operations back

Once we have exp and log, subtraction starts to make sense. For positive x and real y:

We feed each input through the inverse of what EML is about to do to it. Both sides cancel, leaving the subtraction built into EML.

There is a domain restriction in this simple example. The paper's full construction also handles negative inputs using complex intermediate values, with care around logarithm branches and zero.

Zero comes from the logarithm of 1. With subtraction available, we get negation by subtracting from zero and addition by subtracting a negative.

Logarithms then give us multiplication and division. For positive inputs:

Powers follow the same pattern, and a square root is a power of one half:

At each step, we can replace the familiar operations with the EML expressions that produce them. Eventually, every operation in the expression is EML.

What I found especially interesting was how this reaches trigonometry. The full construction gives us i, the square root of negative one, and Euler's formula connects the complex exponential to sine and cosine:

Using x and negative x, we can recover both:

Tangent is then sine divided by cosine. The calculator buttons that seemed like separate building blocks are all connected through these derivations.

Back to the NAND comparison

I suppose this is where my initial question about EML containing exp and log becomes easier to think about.

A NAND gate is built from transistors, but at the Boolean logic level we can choose NAND as our primitive and derive the other operations from it. EML works similarly: we choose one two-input function, then ask what we can build by connecting copies of it.

An ordinary expression might have addition, multiplication, sine and square root at different nodes. In an EML expression, every internal node does the same thing. The leaves are 1 and any input variables.

We use jargon in our everyday language to avoid having to redefine basic concepts when talking to another expert about more complex problems. I can simply ask another software engineer whether a function he wrote is pure, without redefining what side effects are.

In that sense, jargon is a form of information compression.

Similarly, it isn't efficient to reduce everything down to primitives when communicating mathematical expressions. A higher level of abstraction, essentially mathematical jargon, helps us communicate those ideas without expanding every operation into its primitive form.

That does not mean giant EML expressions would be the fastest or most numerically stable way to implement a calculator. But you came up with a very elegant idea, if I may say so, Andrzej.


Source: Andrzej Odrzywołek, All elementary functions from a single binary operator, arXiv:2603.21852, 2026.