84 comments

[ 4.2 ms ] story [ 94.1 ms ] thread
So, like brainf*ck (the esoteric programming language), but for maths?
How would an architecture with a highly-optimized hardware implementation of EML compare with a traditional math coprocessor?
Next step is to build an analog scientific calculator with only EML gates
What would physical EML gates be implemented in reality?

Posts like these are the reason i check HN every day

Both BJTs and FETs have intrinsic exponential/logarithmic behaviors (at low biases) due to charge density being given by the Fermi-Dirac distribution since electrons are fermions.
Interesting, but is the required combination of EML gates less complex than using other primitives?
Depends on how you define complexity?

Like when the Apollo guidance computer was made, the bottleneck was making integrated chips so they only made one, the NOR gate, and a whackton of routing to build out an entire CPU. Horribly complex routing, very simplified integrated circuit construction

> 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.

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.

> 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?

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

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

Wouldn't you also need to keep track of the stack's size, to know if there are leading zeros?
> 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.

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 :)

While I'm really enjoying this paper, I think you are way overstating the significance here. This is mathematically interesting, and conceptually elegant, but there is nothing in this paper that suggests a competitive regression or optimisation approach.

I might have misunderstood, but from the two "Why do X when you can do just Y with EML" sentences, I think you are describing symbolic regression, which has been around for quite some time and is a serious grown-up technique these days. But even the best symbolic regression tools do not typically "replace" other regression approaches.

I can't say I'm surprised at this result at all, in fact I'm surprised something like this wasn't already known.
This isn't all that significant to anyone who has done Calculus 2 and knows about Taylor's Series.

All this really says is that the Taylor's expansions of e^x and ln x are sufficient to express to express trig functions, which is trivially true from Euler's formula as long as you're in the complex domain.

Arithmetic operations follow from the fact that e^x and ln x are inverses, in particular that e^ln(x) = x.

Taylor's series seem a bit like magic when you first see them but then you get to Real Analysis and find out there are whole classes of functions that they can't express.

This paper is interesting but it's not revolutionary.

Given this amazing work, an efficient EML operator HW implementation could revolutionize a bunch of things. So the next thing might be an efficient EML HW implementation.
The compute, energy, and physical cost of this versus a simple x+y is easily an order of magnitude. It will not replace anything in computing, except maybe fringe experiments.
> 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.

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).
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.
The article uses extended arithmetic where ln(0) = -∞.
This is neat, but could someone explain the significance or practical (or even theoretical) utility of it?
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.

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

meta.ai in instant mode gets it first try too (I think?)

``` 2x + y = \operatorname{eml}\Big(1,\; \operatorname{eml}\big(\operatorname{eml}(1,\; \operatorname{eml}(\operatorname{eml}(1,\; \operatorname{eml}(\operatorname{eml}(L_2 + L_x, 1), 1) \cdot \operatorname{eml}(y,1)),1)\big),1\big)\Big) ```

for me Gemini hallucinated EML to mean something else despite the paper link being provided: "elementary mathematical layers"

this should be a tangential proof for the dying bunch of people who still believe that LLMs are just parrots. EML are literally a new invention
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.

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?

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.
Lambda calculus is about discrete computations, this is about continuous functions. You can’t reason about continuous functions in lambda calculus.
(comment deleted)