Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

69% Positive

Analyzed from 4538 words in the discussion.

Trending Topics

#eml#functions#got#function#simplify#expected#sym#num#gates#exp

Discussion (116 Comments)Read Original on HackerNews

DoctorOetkerabout 6 hours ago
EDIT: please change the article link to the most recent version (as of now still v2), it is currently pointing to the v1 version which misses the figures.

I'm still reading this, but if this checks out, this is one of the most significant discoveries in years.

Why use splines or polynomials or haphazardly chosen basis functions if you can just fit (gradient descent) your data or wave functions to the proper computational EML tree?

Got a multidimensional and multivariate function to model (with random samples or a full map)? Just do gradient descent and convert it to approximant EML trees.

Perform gradient descent on EML function tree "phi" so that the derivatives in the Schroedinger equation match.

But as I said, still reading, this sounds too good to be true, but I have witnessed such things before :)

ikrimaabout 6 hours ago
From my experience of working in this problem domain for the last year, I'd say it is pretty powerful but the "too good to be true part" comes from that EML buys elegance through exponential expression blow-up. Multiplication alone requires depth-8 trees with 41+ leaves i.e. minimal operator vocabulary trades off against expression length. There's likely an information-theoretic sweet spot between these extremes.

It's interesting to see his EML approach whereas mine was more on generating a context sensitive homoiconic grammar.

I've had lots of success combining spectral neural nets (GNNs, FNOs, Neural Tangent Kernels) with symbolic regression and using Operad Theory and Category Theory as my guiding mathematical machinery

DoctorOetkerabout 3 hours ago
In my experience this exponential expression blow-up is less the result of the approach of decomposing into a minimum of primitives, but rather a result from repetition in expression trees:

If we make the analogy from Bertrand Russel's Principia Mathematica, he derived fully expanded expressions, i.e. trees where the leaves only may refer to the same literals, everyone claimed this madness underscored how formal verification of natural mathematics was a fools errand, but nevertheless we see successful projects like metamath (us.metamath.org) where this exponential blow-up does not occur. It is easy to see why: instead of representing proofs as full trees, the proofs are represented as DAG's. The same optimization would be required for EML to prevent exponential blow-up.

Put differently: if we allow extra buttons besides {1, EML} for example to capture unary functions the authors mentally add an 'x' button so now the RPN calculator has {1, EML, x}; but wait if you want multivariate functions it becomes an RPN calculator with extra buttons {1, EML, x,y,z} for example.

But why stop there? in metamath proofs are compressed: if an expression or wff was proven before in the same proof, it first subproof is given a number, and any subsequent invocations of this N'th subproof refers to this number. Why only recall input parameters x,y,z but not recall earlier computed values/functions?

In fact every proof in metamath set.mm that uses this DAG compressibility, could be split into the main proof and the repeatedly used substatements could be automatically converted to explicitly separate lemma proofs, in which case metamath could dispose of the single-proof DAG compression (but it would force proofs to split up into lemma's + main proof.

None of the proven theorems in metamath's set.mm displays the feared exponential blowup.

gopalvabout 5 hours ago
> Multiplication alone requires depth-8 trees with 41+ leaves i.e. minimal operator vocabulary trades off against expression length.

That is sort of comparable to how NAND simplify scaling.

Division is hell on gates.

The single component was the reason scaling went like it did.

There was only one gate structure which had to improve to make chips smaller - if a chip used 3 different kinds, then the scaling would've required more than one parallel innovation to go (sort of like how LED lighting had to wait for blue).

If you need two or more components, then you have to keep switching tools instead of hammer, hammer, hammer.

tripletaoabout 4 hours ago
I'm not sure what you mean by this? It's true that any Boolean operation can be expressed in terms of two-input NAND gates, but that's almost never how real IC designers work. A typical standard cell library has lots of primitives, including all common gates and up to entire flip-flops and RAMs, each individually optimized at a transistor level. Realization with NAND2 and nothing else would be possible, but much less efficient.

Efficient numerical libraries likewise contain lots of redundancy. For example, sqrt(x) is mathematically equivalent to pow(x, 0.5), but sqrt(x) is still typically provided separately and faster. Anyone who thinks that eml() function is supposed to lead directly to more efficient computation has missed the point of this (interesting) work.

meindnochabout 2 hours ago
Are you under the impression that CPUs are made exclusively from NAND gates? You can't be serious.
canjobearabout 6 hours ago
Link to your work?
gilgoomeshabout 6 hours ago
> Why use splines or polynomials or haphazardly chosen basis functions if you can just fit (gradient descent) your data or wave functions to the proper computational EML tree?

Same reason all boolean logic isn't performed with combinations of NAND – it's computationally inefficient. Polynomials are (for their expressivity) very quick to compute.

brucehoultabout 4 hours ago
The Cray 1 was built 100% from NOR gates and SRAM.
Nevermarkabout 6 hours ago
They are done with transistors though. Transistors form an efficient, single element, universal digital basis.

And are a much less arbitrary choice than NAND, vs. NOR, XOR, etc.

Using transistors as conceptual digital logic primitives, where power dissipation isn't a thing, Pass Logic is "The Way".

samusabout 4 hours ago
Single transistors aren't yet logic gates by themselves; they are amplifiers with a very specific gain function that makes it possible to use them as switches. Logic gates usually consist of at least two transistors. See https://en.wikipedia.org/wiki/CMOS for an example of how it is done in CMOS technology.
throw-qqqqqabout 1 hour ago
> Transistors form an efficient, single element, universal digital basis

But transistors can be N or P-channel, so it’s not a single logical primitive, like e.g. NAND-gates.

canjobearabout 6 hours ago
> Why use splines or polynomials or haphazardly chosen basis functions if you can just fit (gradient descent) your data or wave functions to the proper computational EML tree?

Because the EML basis makes simple functions (like +) hard to express.

Not to diminish this very cool discovery!

DoctorOetkerabout 3 hours ago
consider how a wavefunction might be stored for numerically searching the ground state of a molecule, or a crystal lattice, humans appreciate 2D imagery that is about 1 kilopixel x 1 kilopixel; so expanding this to 3 dimensions that means the wavefunction would have to store 10 ^ 9 complex numbers (easily 4 GB at 16 bit precision for real and imaginary compnents so 4 bytes per complex number), do we really believe that a DAG variant of the EML construction would consume a bigger value to represent the analytically correct solution? do we really believe that the 4GB DAG variant of EML would produce a less accurate representation (i.e. less fidelity with the schroedinger equation?) If the ground state hydrogen atom is any indication, my money is on EML-style constructions, not naive 3D arrays modelling the wavefunction by brute force.

This also re-opens a lot of "party pooper" results in mathematics: impossibility of representing solutions to general quintic (fine print: if we restrict ourselves to arithmetic and roots/radicals). In mathematics and physics there have been a lot of "party pooper" results which later found more profound and interesting positive results by properly rephrasing the question. A negative result for a myopic question isn't very informative on its own.

eruabout 6 hours ago
> I'm still reading this, but if this checks out, this is one of the most significant discoveries in years.

It seems like a neat parlour trick, indeed. But significant discovery?

dangabout 4 hours ago
What URL should we change it to?
fc417fc802about 3 hours ago
IMO arxiv links should pretty much always be to the abstract (ie .../abs/...) as opposed to particular versions of the html or pdf.
lioetersabout 4 hours ago
The URL is already pointing at v2, which apparently is the newest one requested by the comment above.

> Submitted on 23 Mar 2026 (v1), last revised 4 Apr 2026 (this version, v2)

dangabout 4 hours ago
Thanks! that's what it looked like to me too.
entaloneralieabout 7 hours ago
This is amazing! I love seeing FRACTRAN-shaped things on the homepage :) This reminds me of how 1-bit stacks are encoded in binary:

A stack of zeros and ones can be encoded in a single number by keeping with bit-shifting and incrementing.

    Pushing a 0 onto the stack is equivalent to doubling the number.
    Pushing a 1 is equivalent to doubling and adding 1.
    Popping is equivalent to dividing by 2, where the remainder is the number.
I use something not too far off for my daily a programming based on a similar idea:

Rejoice is a concatenative programming language in which data is encoded as multisets that compose by multiplication. Think Fractran, without the rule-searching, or Forth without a stack.

https://wiki.xxiivv.com/site/rejoice

eugene3306about 5 hours ago
This makes a good benchmark LLMs:

``` look at this paper: https://arxiv.org/pdf/2603.21852

now please produce 2x+y as a composition on EMLs ```

Opus(paid) - claimed that "2" is circular. Once I told it that ChatGPT have already done this, finished successfully.

ChatGPT(free) - did it from the first try.

Grok - produced estimation of the depth of the formula.

Gemini - success

Deepseek - Assumed some pre-existing knowledge on what EML is. Unable to fetch the pdf from the link, unable to consume pdf from "Attach file"

Kimi - produced long output, stopped and asked to upgrade

GLM - looks ok

fc417fc802about 3 hours ago
> Once I told it that ChatGPT have already done this, finished successfully.

TIL you can taunt LLMs. I guess they exhibit more competitive spirit than I thought.

eruabout 2 hours ago
I copy and pasted the abstract into DeepSeek and asked your question. It's a bit unfair to penalise it for not knowing PDFs.

It got a result.

theanonymousoneabout 1 hour ago
I changed the prompt to this:

""" Consider a mathematical function EML defined as `eml(x,y)=exp(x)−ln(y)`

Please produce `sin(x)/x` as a composition on EMLs and constant number 1 (one). """

spuzabout 2 hours ago
So what is the correct answer?
vintermann15 minutes ago
I'm way too unschooled to say if it's important or not, but what really excites me is the Catalan structure ("Every EML expression is a binary tree [...] isomorphic to well-studied combinatorial objects like full binary trees and Catalan objects").

So, what happens if you take say the EML expression for addition, and invert the binary tree?

lioetersabout 6 hours ago
> A calculator with just two buttons, EML and the digit 1, can compute everything a full scientific calculator does

Reminds me of the Iota combinator, one of the smallest formal systems that can be combined to produce a universal Turing machine, meaning it can express all of computation.

testaccount28about 5 hours ago
derivation of -x seems wrong. we can look at the execution trace on a stack machine, but it's actually not hard to see. starting from the last node before the output, we see that the tree has the form

    eml(z, eml(x, 1))
      = e^z - ln(eml(x, 1))
      = e^z - ln(e^x)
      = e^z - x
and the claim is that, after it's expanded, z will be such that this whole thing is equal to -x. but with some algebra, this is happening only if

    e^z = 0,
and there is no complex number z that satisfies this equation. indeed if we laboriously expand the given formula for z (the left branch of the tree), we see that it goes through ln(0), and compound expressions.

x^-1 has the same problem.

both formulae work ...sort of... if we allow ln(0) = Infinity and some other moxie, such as x / Infinity = 0 for all finite x.

NooneAtAll3about 4 hours ago
yeah, it's annoying that author talks about RPN notation, but only gives found formulas in form of images

looks like it computes ln(1)=0, then computes e-ln(0)=+inf, then computes e-ln(+inf)=-inf

testaccount28about 5 hours ago
ah, the paper acknowledges this. my bad for jumping to the diagrams!
Rubicundabout 4 hours ago
On page 11, the paper explicitly states:

> EML-compiled formulas work flawlessly in symbolic Mathematica and IEEE754 floating-point… This is because some formulas internally might rely on the following properties of extended reals: ln 0 = −∞, e^(−∞) = 0.

And then follows with:

> But EML expressions in general do not work ‘out of the box’ in pure Python/Julia or numerical Mathematica.

Thus, the paper’s completeness claim depends on a non-standard arithmetic convention (ln(0) = -∞), not just complex numbers as it primarily advertises. While the paper is transparent about this, it is however, buried on page 11 rather than foregrounded as a core caveat. Your comment deserves credit for flagging it.

adrian_babout 1 hour ago
I would not call a "non-standard arithmetic convention" that ln(0) = -∞.

This is the standard convention when doing operations in the extended real number line, i.e. in the set of the real numbers completed with positive and negative infinities.

When the overflow exception is disabled, any modern CPU implements the operations with floating-point numbers as operations in the extended real number line.

So in computing this convention has been standard for more than 40 years, while in mathematics it has been standard for a couple of centuries or so.

As always in mathematics, when computing expressions, i.e. when computing any kind of function, you must be aware very well which are the sets within which you operate.

If you work with real numbers (i.e. in a computer you enable the FP overflow exception), then ln(0) is undefined. However, if you work with the extended real number line, which is actually the default setting in most current programming languages, then ln(0) is well defined and it is -∞.

Rubicundabout 4 hours ago
The author does address this further on page 14 of SI and provides an alternative of:

−z = 1 − (e − ((e − 1) − z))

future_crew_fan12 minutes ago
there ought to be a special section on HN entitled "things that will make you feel thoroughly inadequate".
CGamesPlayabout 4 hours ago
I made a fun marimo notebook to try and derive these myself. I structured each cell in order based on the diagram at the end of the paper. It uses Sympy to determine if the function is correct or not.

https://gist.github.com/CGamesPlay/9d1fd0a9a3bd432e77c075fb8...

krickabout 6 hours ago
> using EML trees as trainable circuits ..., I demonstrate the feasibility of exact recovery of closed-form elementary functions from numerical data at shallow tree depths up to 4

That's awesome. I always wondered if there is some way to do this.

qillerabout 7 hours ago
For completeness, there is also Peirce’s arrow aka NOR operation which is functionally complete. Fun applications iirc VMProtect copy protection system has an internal VM based on NOR.

Quick google seach brings up https://github.com/pr701/nor_vm_core, which has a basic idea

evnixabout 4 hours ago
Can someone explain how is this different from lambda calculus, it seems like you can derive the same in both. I don't understand both well enough and hence the question.
sigmoid10about 4 hours ago
Lamda kind of does this in an analogous form, but does not allow you to derive this particular binary expression as a basis for elementary functions. There is a related concept with Iota [1], which allows you express every combinatoric SKI term and in turn every lambda definable function. But similar to this particular minimalist scientific function expression, it is mostly of interest for reductionist enthusiasts and not for any practical purpose.

[1] https://en.wikipedia.org/wiki/Iota_and_Jot

trompabout 4 hours ago
Any lambda term is equivalent to a combinatory term over a one-point basis (like λxλyλz. x z (y (λ_.z)) [1]). One difference is that lambda calculus doesn't distinguish between functions and numbers, and in this case no additional constant (like 1) is needed.

[1] https://github.com/tromp/AIT/blob/master/ait/minbase.lam

bolluabout 4 hours ago
Lambda calculus talks about computable functions, where the types of the inputs are typically something discrete, like `Bool` or `Nat`. Here, the domain is the real numbers.
TJSomethingabout 4 hours ago
The short answer is that the lambda calculus computes transformations on digital values while this is for building functions that can transform continuous (complex) values.
Advertisement
theanonymousone35 minutes ago
Zero will also be handy in definitions: `0=eml(1,eml(eml(1,1),1))`.

And i is obviously `sqrt(-1)`

genxy24 minutes ago
I hope this was presented at SIGBOVIK.
rvnxabout 1 hour ago
Looks like he bruteforced all combinations of two mathematical operations no ?
simplesighmanabout 7 hours ago
> For example, exp(x)=eml(x,1), ln(x)=eml(1,eml(eml(1,x),1)), and likewise for all other operations

I read the paper. Is there a table covering all other math operations translated to eml(x,y) form?

sandrocksandabout 6 hours ago
I think what you want is the supplementary information, part II "completeness proof sketch" on page 12. You already spotted the formulas for "exp" and real natural "L"og; then x - y = eml(L(x), exp(y)) and from there apparently it is all "standard" identities. They list the arithmetic operators then some constants, the square root, and exponentials, then the trig stuff is on the next page.

You can find this link on the right side of the arxiv page:

https://arxiv.org/src/2603.21852v2/anc/SupplementaryInformat...

vbezhenarabout 6 hours ago
Didn't read the paper, but it was easy for me to derive constants 0, 1, e and functions x + y, x - y, exp(x), ln(x), x * y, x / y. So seems to be enough for everything. Very elegant.
saratogacxabout 7 hours ago
last page of the PDF has several tree's that represent a few common math functions.
jmyeetabout 6 hours ago
I was curious about that too. Gemini actually gave a decent list. Trig functions come from Euler's identity:

    e^ix = cos x + i sin x
which means:

    e^-ix = cos -x + i sin -x
          = cos x - i sin x
so adding them together:

   e^ix + e^-ix = 2 cos x
   cos x = (e*ix - e^-ix) / 2
So I guess the real part of that.

Multiplication, division, addition and subtraction are all straightforward. So are hyperbolic trig functions. All other trig functions can be derived as per above.

jekudeabout 7 hours ago
What would physical EML gates be implemented in reality?

Posts like these are the reason i check HN every day

DoctorOetkerabout 7 hours ago
probably with op-amps
prvcabout 5 hours ago
This is neat, but could someone explain the significance or practical (or even theoretical) utility of it?
WilcoKruijer33 minutes ago
From the paper:

> Everyone learns many mathematical operations in school: fractions, roots, logarithms, and trigonometric functions (+, −, ×, /, sqrt, sin, cos, log, …), each with its own rules and a dedicated button on a scientific calculator. Higher mathematics reveals that many of these are redundant: for example, trigonometric ones reduce to the complex exponential. How far can this reduction go? We show that it goes all the way: a single operation, eml(x, y), replaces every one of them. A calculator with just two buttons, EML and the digit 1, can compute everything a full scientific calculator does. This is not a mere mathematical trick. Because one repeatable element suffices, mathematical expressions become uniform circuits, much like electronics built from identical transistors, opening new ways to encoding, evaluating, and discovering formulas across scientific computing.

geocarabout 4 hours ago
Read the paper. On the third page is a "Significance statement".
fxwin38 minutes ago
eh, i didnt find that paragraph very helpful. it just restates what it means do decompose an expression into another one only relying on eml, and vaguely gestures at what this could mean, i was hoping for something more specific.
bluegattyabout 4 hours ago
second, please help us laypeople here
notoranditabout 5 hours ago
Not sure it really compares to NAND() and the likes.

Simply because bool algebra doesn't have that many functions and all of them are very simple to implement.

A complex bool function made out of NANDs (or the likes) is little more complex than the same made out of the other operators.

Implementing even simple real functions out of eml() seems to me to add a lot of computational complexity even with both exp() and ln() implemented in hardware in O(1). I think about stuff sum(), div() and mod().

Of course, I might be badly wrong as I am not a mathematician (not even by far).

But I don't see, at the moment, the big win on this.

adrian_babout 1 hour ago
This has no use for numeric computations, but it may be useful in some symbolic computations, where it may provide expressions with some useful properties, e.g. regarding differentiability, in comparison with alternatives.
peterlkabout 7 hours ago
Reminds me a bit of the coolest talk I ever got to see in person: https://youtu.be/FITJMJjASUs?si=Fx4hmo77A62zHqzy

It’s a derivation of the Y combinator from ruby lambdas

Analemma_about 7 hours ago
If you've never worked through a derivation/explanation of the Y combinator, definitely find one (there are many across the internet) and work through it until the light bulb goes off. It's pretty incredible, it almost seems like "matter ex nihilo" which shouldn't work, and yet does.

It's one of those facts that tends to blow minds when it's first encountered, I can see why one would name a company after it.

thaumasiotesabout 7 hours ago
Have you gone through The Little Schemer?

More on topic:

> No comparable primitive has been known for continuous mathematics: computing elementary functions such as sin, cos, sqrt, and log has always required multiple distinct operations.

I was taught that these were all hypergeometric functions. What distinction is being drawn here?

adrian_babout 1 hour ago
Hypergeometric functions are functions with 4 parameters.

When you have a function with many parameters it becomes rather trivial to express simpler functions with it.

You could find a lot of functions with 4 parameters that can express all elementary functions.

Finding a binary operation that can do this, like in TFA, is far more difficult, which is why it has not been done before.

A function with 4 parameters can actually express not only any elementary function, but an infinity of functions with 3 parameters, e.g. by using the 4th parameter to encode an identifier for the function that must be computed.

thaumasiotes32 minutes ago
> Hypergeometric functions are functions with 4 parameters.

Granted, but the claim in the abstract says:

>> computing elementary functions such as sin, cos, sqrt, and log has always required multiple distinct operations

And I don't see how this is true as to hypergeometric functions in a way that isn't shared by the approach in the paper.

> Finding a binary operation that can do this, like in TFA, is far more difficult, which is why it has not been done before.

> A function with 4 parameters can actually express not only any elementary function, but an infinity of functions with 3 parameters, e.g. by using the 4th parameter to encode an identifier for the function that must be computed.

These statements seem to be in direct conflict with each other; you can use the second parameter of a binary function to identify a unary function just as you can use the fourth parameter of a quaternary function to identify a trinary one.

psychoslaveabout 5 hours ago
Very nice, though I'm not found of the name.

What comes to my mind as an alternative which I would subjectivity finer is "axe". Think axiom or axiology.

Anyone with other suggestions? Or even remarks on this one?

fxwin36 minutes ago
i think eml is fine, names should be connected to the thing they represent so 'exponential minus log' makes sense to me
nonfamousabout 7 hours ago
How would an architecture with a highly-optimized hardware implementation of EML compare with a traditional math coprocessor?
tripletaoabout 3 hours ago
It would almost always be much, much worse. Practical numerical libraries (whether implemented in hardware or software) contain lots of redundancy, because their goal is to give you an optimized primitive as close as possible to the operation you actually want. For example, the library provides an optimized tan(x) to save you from calling sin(x)/cos(x), because one nasty function evaluation (as a power series, lookup table, CORDIC, etc.) is faster than two nasty function evaluations and a divide.

Of course the redundant primitives aren't free, since they add code size or die area. In choosing how many primitives to provide, the designer of a numerical library aims to make a reasonable tradeoff between that size cost and the speed benefit.

This paper takes that tradeoff to the least redundant extreme because that's an interesting theoretical question, at the cost of transforming commonly-used operations with simple hardware implementations (e.g. addition, multiplication) into computational nightmares. I don't think anyone has found a practical application for their result yet, but that's not the point of the work.

wildzzzabout 7 hours ago
Dreadfully slow for integer math but probably some similar performance to something like a CORDIC for specific operations. If you can build an FPU that does exp() and ln() really fast, it's simple binary tree traversal to find the solution.
AlotOfReadingabout 7 hours ago
You already have an FPU that approximates exp() and ln() really fast, because float<->integer conversions approximate the power 2 functions respectively. Doing it accurately runs face-first into the tablemaker's dilemma, but you could do this with just 2 conversions, 2 FMAs (for power adjustments), and a subtraction per. A lot of cases would be even faster. Whether that's worth it will be situational.
Advertisement
khelavastrabout 3 hours ago
Is the the same as saying everything can be made from nand gates?
adrian_babout 1 hour ago
With NAND gates you can make any discrete system, but you can only approximate a continuous system.

This work is about continuous systems, even if the reduction of many kinds of functions to compositions of a single kind of function is analogous to the reductions of logic functions to composing a few kinds or a single kind of logic functions.

I actually do not value the fact that the logic functions can be expressed using only NAND. For understanding logic functions it is much more important to understand that they can be expressed using either only AND and NOT, or only OR and NOT, or only XOR and AND (i.e. addition and multiplication modulo 2).

Using just NAND or just NOR is a trick that does not provide any useful extra information. There are many things, including classes of mathematical functions or instruction sets for computers, which can be implemented using a small number of really independent primitives.

In most or all such cases, after you arrive to the small set of maximally simple and independent primitives, you can reduce them to only one primitive.

However that one primitive is not a simpler primitive, but it is a more complex one, which can do everything that the maximally simple primitives can do, and it can recreate those primitives by composition with itself.

Because of its higher complexity, it does not actually simplify anything. Moreover, generating the simpler primitives by composing the more complex primitive with itself leads to redundancies, if implemented thus in hardware.

This is a nice trick, but like I have said, it does not improve in any way the understanding of that domain or its practical implementations in comparison with thinking in terms of the multiple simpler primitives.

For instance, one could take a CMOS NAND gate as the basis for implementing a digital circuit, but you understand better how the CMOS logic actually works when you understand that actually the AND function and the NOT function are localized in distinct parts of that CMOS NAND gate. This understanding is necessary when you have to design other gates for a gate library, because even if using a single kind of gate is possible, the performance of this approach is quite sub-optimal, so you almost always you have to design separately, e.g. a XOR gate, instead of making it from NAND gates or NOR gates.

In CMOS logic, NAND gates and NOR gates happen to be the simplest gates that can restore at output the same logic levels that are used at input. This confuses some people to think that they are the simplest CMOS gates, but they are not the simplest gates when you remove the constraint of restoring the logic levels. This is why you can make more complex logic gates, e.g. XOR gates or AND-OR-INVERT gates, which are simpler than they would be if you made them from distinct NAND gates or NOR gates.

tripdoutabout 7 hours ago
Interesting, but is the required combination of EML gates less complex than using other primitives?
eruabout 6 hours ago
In general, no.
pveierlandabout 2 hours ago
Got curious to see whether SymPy could be used to evaluate the expressions, so I used Claude Code to build a quick evaluator. Numeric and symbolic results appear to agree:

    nix run github:pveierland/eml-eval
    EML Evaluator — eml(x, y) = exp(x) - ln(y)
    Based on arXiv:2603.21852v2 by A. Odrzywołek
    
    Constants
    ------------------------------------------------------------------------------
      1        K=1    d=0    got 1                    expected 1                    sym=ok   num=ok   [simplify]
      e        K=3    d=1    got 2.718281828          expected 2.718281828          sym=ok   num=ok   [simplify]
      0        K=7    d=3    got 0                    expected 0                    sym=ok   num=ok   [simplify]
      -1       K=17   d=7    got -1                   expected -1                   sym=ok   num=ok   [simplify]
      2        K=27   d=9    got 2                    expected 2                    sym=ok   num=ok   [simplify]
      -2       K=43   d=11   got -2                   expected -2                   sym=ok   num=ok   [simplify]
      1/2      K=51   d=15   got 0.5                  expected 0.5                  sym=ok   num=ok   [simplify]
      -1/2     K=67   d=17   got -0.5                 expected -0.5                 sym=ok   num=ok   [simplify]
      2/3      K=103  d=19   got 0.6666666667         expected 0.6666666667         sym=ok   num=ok   [simplify]
      -2/3     K=119  d=21   got -0.6666666667        expected -0.6666666667        sym=ok   num=ok   [simplify]
      sqrt2    K=85   d=21   got 1.414213562          expected 1.414213562          sym=ok   num=ok   [simplify]
      i        K=75   d=19   got i                    expected i                    sym=ok   num=ok   [i²=-1, simplify]
      pi       K=153  d=29   got 3.141592654          expected 3.141592654          sym=ok   num=ok   [simplify]
    
    Unary functions  (x = 7/3)
    ------------------------------------------------------------------------------
      exp(x)   K=3    d=1    got 10.3122585           expected 10.3122585           sym=ok   num=ok   [simplify]
      ln(x)    K=7    d=3    got 0.8472978604         expected 0.8472978604         sym=ok   num=ok   [simplify]
      -x       K=17   d=7    got -2.333333333         expected -2.333333333         sym=ok   num=ok   [simplify]
      1/x      K=25   d=8    got 0.4285714286         expected 0.4285714286         sym=ok   num=ok   [simplify]
      x - 1    K=11   d=4    got 1.333333333          expected 1.333333333          sym=ok   num=ok   [simplify]
      x + 1    K=27   d=9    got 3.333333333          expected 3.333333333          sym=ok   num=ok   [simplify]
      2x       K=67   d=17   got 4.666666667          expected 4.666666667          sym=ok   num=ok   [simplify]
      x/2      K=51   d=15   got 1.166666667          expected 1.166666667          sym=ok   num=ok   [simplify]
      x^2      K=41   d=10   got 5.444444444          expected 5.444444444          sym=ok   num=ok   [simplify]
      sqrt(x)  K=59   d=16   got 1.527525232          expected 1.527525232          sym=ok   num=ok   [simplify]
    
    Binary operations  (x = 7/3, y = 5/2)
    ------------------------------------------------------------------------------
      x + y    K=27   d=9    got 4.833333333          expected 4.833333333          sym=ok   num=ok   [simplify]
      x - y    K=11   d=4    got -0.1666666667        expected -0.1666666667        sym=ok   num=ok   [simplify]
      x * y    K=41   d=10   got 5.833333333          expected 5.833333333          sym=ok   num=ok   [simplify]
      x / y    K=25   d=8    got 0.9333333333         expected 0.9333333333         sym=ok   num=ok   [simplify]
      x ^ y    K=49   d=12   got 8.316526261          expected 8.316526261          sym=ok   num=ok   [simplify]
selcukaabout 7 hours ago
So, like brainf*ck (the esoteric programming language), but for maths?
Lercabout 7 hours ago
But even tighter. With eml and 1 you could encode a funtion in rpn as bits.

Although you also need to encode where to put the input.

The real question is what emoji to use for eml when written out.

zephenabout 7 hours ago
> The real question is what emoji to use for eml when written out.

Some Emil or another, I suppose. Maybe the one from Ratatouille, or maybe this one: https://en.wikipedia.org/wiki/Emil_i_L%C3%B6nneberga

Charon77about 7 hours ago
Not brainf*ck. This is the SUBLEQ equivalent of math https://en.wikipedia.org/wiki/One-instruction_set_computer#S...
selcukaabout 6 hours ago
So brainf*ck in binary?

I'm kidding, of course. You can encode anything in bits this way.

nostrademonsabout 6 hours ago
More like lambda calculus, but for continuous functions.
hyperhelloabout 7 hours ago
> eml(x,y)=exp(x)-ln(y)

Exp and ln, isn't the operation its own inverse depending on the parameter? What a neat find.

thaumasiotesabout 6 hours ago
> isn't the operation its own inverse depending on the parameter?

This is a function from ℝ² to ℝ. It can't be its own inverse; what would that mean?

woopsnabout 6 hours ago
It's a kind of superposition representation a la Kolmogorov-Arnold, a learnable functional basis for elementary functions g(x,y)=f(x) - f^{-1}(y) in this sense with f=exp.
hyperhelloabout 6 hours ago
eml(1,eml(x,1)) = eml(eml(1,x),1) = exp(ln(x)) = ln(exp(x)) = x
thaumasiotesabout 4 hours ago
But f(x) = eml(1, x) and g(x) = eml(x, 1) are different operations. What operation are you saying is supposed to be its own inverse?
freehorseabout 2 hours ago
eml(1,eml(x,1)) = e + x

and

eml(eml(1,x),1) = e^e * x

supermdguyabout 7 hours ago
Next step is to build an analog scientific calculator with only EML gates
nurettinabout 5 hours ago
The problem with symbolic regression is ln(y) is undefined at 0, so you can't freely generate expressions with it. We need to guard it with something like ln(1+y*y) or ln(1+|y|) or return undefined.
BobbyTables2about 8 hours ago
How does one actually add with this?
curtisfabout 6 hours ago
It's basically using the "-" embedded in the definition of the eml operator.

Table 4 shows the "size" of the operators when fully expanded to "eml" applications, which is quite large for +, -, ×, and /.

Here's one approach which agrees with the minimum sizes they present:

        eml(x, y             ) = exp(x) − ln(y) # 1 + x + y
        eml(x, 1             ) = exp(x)         # 2 + x
        eml(1, y             ) = e - ln(y)      # 2 + y
        eml(1, exp(e - ln(y))) = ln(y)          # 6 + y; construction from eq (5)
                         ln(1) = 0              # 7
After you have ln and exp, you can invert their applications in the eml function

              eml(ln x, exp y) = x - y          # 9 + x + y
Using a subtraction-of-subtraction to get addition leads to the cost of "27" in Table 4; I'm not sure what formula leads to 19 but I'm guessing it avoids the expensive construction of 0 by using something simpler that cancels:

                   x - (0 - y) = x + y          # 25 + {x} + {y}
bzaxabout 8 hours ago
Well, once you've derived unary exp and ln you can get subtraction, which then gets you unary negation and you have addition.
freehorseabout 5 hours ago
And then by using the fact that the exponential turns addition into multiplication, you get multiplication (and subtraction gives division).
nick238about 7 hours ago
Don't know adding, but multiplication has diagram on the last page of the PDF.

xy = eml(eml(1, eml(eml(eml(eml(1, eml(eml(1, eml(1, x)), 1)), eml(1, eml(eml(1, eml(y, 1)), 1))), 1), 1)), 1)

From Table 4, I think addition is slightly more complicated?

simplesighmanabout 6 hours ago
Thanks for posting that. You had a transcribing typo which was corrected in the ECMAScript below. Here's the calculation for 5 x 7:

    const eml = (x,y) => Math.exp(x) - Math.log(y);
    const mul = (x,y) => eml(eml(1,eml(eml(eml(1,eml(eml(1,eml(1,x)),1)),eml(1,eml(eml(1,eml(y,1)),1))),1)),1);
    console.log(mul(5,7));
> 35.00000000000001

For larger or negative inputs you get a NaN because ECMAScript has limited precision and doesn't handle imaginary numbers.

Charon77about 6 hours ago
x+y = ln(exp(x) * exp(y))

exp(a) = eml(a, 1) ln(a)=eml(1,eml(eml(1,a),1))

Plugging those in is an excercise to the reader

jcgrilloabout 6 hours ago
might need to turn the paper sideways
zephenabout 7 hours ago
Judging by the title, I thought I would have a good laugh, like when the doctor discovered numerical integration and published a paper.

But no...

This is about continuous math, not ones and zeroes. Assuming peer review proves it out, this is outstanding.

paulpauperabout 6 hours ago
I don't think this is ever making it past the editor of any journal, let alone peer review.

Elementary functions such as exponentiation, logarithms and trigonometric functions are the standard vocabulary of STEM education. Each comes with its own rules and a dedicated button on a scientific calculator;

What?

and No comparable primitive has been known for continuous mathematics: computing elementary functions such as sin, cos, √ , and log has always required multiple distinct operations. Here we show that a single binary operator

Yeah, this is done by using tables and series. His method does not actually facilitate the computation of these functions.

There is no such things as "continuous mathematics". Maybe he meant to say continuous function?

Looking at page 14, it looks like he reinvented the concept of the vector valued function or something. The whole thing is rediscovering something that already exists.

avmichabout 4 hours ago
The principal result is "all elementary functions can be represented by this function and constant 1". I'm not sure if this was known before. Applications are another matter, but I suspect interesting ones do exist.
traesabout 5 hours ago
This preprint was written by a researcher at an accredited university with a PhD in physics. I'm sure they know what a vector valued function is.

The point of this paper is not to revolutionize how a scientific calculator functions overnight, its to establish a single binary operation that can reproduce the rest of the typical continuous elementary operations via repeated application, analogous to how a NAND or NOR gate creates all of the discrete logic gates. Hence, "continuous mathematics" as opposed to discrete mathematics. It seems to me you're being overly negative without solid reasoning.

paulpauperabout 4 hours ago
its to establish a single binary operation that can reproduce the rest of the typical continuous elementary operations via repeated application,

But he didn't show this though. I skimmed the paper many times. He creates multiple branches of these trees in the last page, so it's not truly a single nested operation.

nooberminabout 6 hours ago
I don't mean to shit on their interesting result, but exp or ln are not really that elementary themselves... it's still an interesting result, but there's a reason that all approximations are done using series of polynomials (taylor expansion).
traesabout 6 hours ago
Elementary function is a technical term that this paper uses correctly, not a generic prescription of simplicity.

See https://en.wikipedia.org/wiki/Elementary_function.

xpeabout 6 hours ago
> but there's a reason that all approximations are done using series of polynomials (taylor expansion).

"All" is a tall claim. Have a look at https://perso.ens-lyon.fr/jean-michel.muller/FP5.pdf for example. Jump to slide 18:

> Forget about Taylor series

> Taylor series are local best approximations: they cannot compete on a whole interval.

There is no need to worry about "sh-tt-ng" on their result when there is so much to learn about other approximation techniques.

Advertisement