abirvalarg

eml functions search

On this page i will describe what i've done during the development of tools to search for the functions. Later, it will be compiled into a document

Apr 22 2026

Motivation and site launch

Motivation

Yesterday i've became really interested in the eml(x, y) function, which was recently found to be enough, along with number 1, to be enough to represent any other function. The function is defined as following: eml(x, y) = exp(x) - ln(y).

I decided it will be interesting to create a virtual machine based on this function, which i did. There's only 1 available instruction, like in SUBLEQ, except this one works with floats instead of integers. There are 4 operands, each 1 byte in size: dest, x, y and branch. 1st 3 are addresses in memory - array of 256 floats. on each step, dest <- eml(x, y); if the result <= 0.0, branch becomes the address of the next instruction, otherwise, next instruction in the list is executed.

The machine worked, but there was a problem: i realized that figuring out the algorithms for this machine is not so easy. For example, i still don't know how to subtract 1 from a number. And there are more complex functions i may want to use. So i decided to make computers do the work for me: i give it a formula and it outputs its equivalent using only eml and 1, how hard can it be?

A site

So, how am i going to do that? I will make a site so i can run the search on a server instead of running locally. I think it makes sense because, i assume, search may take a long time to complete, especially without optimizations. So i'd rather run it on a stable server where it won't interfere with other things. And the site will only control the execution.

The core of the site is the math engine, which i decided to write in Racket, which is a dialect of Scheme, which itself is a dialect of LISP. LISP was often used in symbolic computations in the past. My task is exactly that - i have a bunch of operations and variables and i want to manipulate those according to some set of rules to convert it to a different form.

On early stages (now), i just want to simplify the expression provided to the engine and convert it to a more convenient form. Later i will add functionality to match the expression against known patterns to convert it to emls and to try adding more complicated forms as it may be required to come to final form.

While still work-in-progress, the site is already available! Please don't break it.

Apr 23 2026

First prototype

Basically, i made something like a pattern matcher for the engine. It isn't perfect, neither are the patterns that i have put into this program, but it can find some simple things. Now a big problem is that i don't know if it needs more time or better patterns.

Another problem is that the engine works in some very sub-optimal ways, as i wrote it in like 2 days. So it definitely needs more time and uses more memory than strictly necessary. Memory is especially the problem for the weak server i'm using. Maybe it's worth upgrading to 2GB.

I definitely need to add more relevant patterns. Although, maybe upgrades to the pattern matcher will also be very, if not more, useful. It is possible that i have enough to find x - 1 but the algorithm is just too dumb for it.