frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

All elementary functions from a single binary operator

https://arxiv.org/abs/2603.21852
92•pizza•2h ago

Comments

BobbyTables2•2h ago
How does one actually add with this?
bzax•1h ago
Well, once you've derived unary exp and ln you can get subtraction, which then gets you unary negation and you have addition.
nick238•42m 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?

Charon77•15m 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

simplesighman•4m 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
peterlk•1h 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

thaumasiotes•1h 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?

Analemma_•1h 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.

selcuka•1h ago
So, like brainf*ck (the esoteric programming language), but for maths?
Lerc•1h 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.

zephen•49m 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

Charon77•39m ago
Not brainf*ck. This is the SUBLEQ equivalent of math https://en.wikipedia.org/wiki/One-instruction_set_computer#S...
selcuka•23m ago
So brainf*ck in binary?

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

nonfamous•1h ago
How would an architecture with a highly-optimized hardware implementation of EML compare with a traditional math coprocessor?
wildzzz•1h 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.
AlotOfReading•27m 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.
supermdguy•1h ago
Next step is to build an analog scientific calculator with only EML gates
jekude•1h ago
What would physical EML gates be implemented in reality?

Posts like these are the reason i check HN every day

DoctorOetker•32m ago
probably with op-amps
tripdout•1h ago
Interesting, but is the required combination of EML gates less complex than using other primitives?
hyperhello•59m 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.

thaumasiotes•25m 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?

hyperhello•4m ago
exp(1,exp(x,1)) = exp(exp(1,x),1) = x
zephen•56m 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.

paulpauper•9m 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?

The whole thing comes off a gibberish or rediscovering something that already exists.

simplesighman•45m 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?

saratogacx•27m ago
last page of the PDF has several tree's that represent a few common math functions.
jmyeet•23m 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.

sandrocksand•14m 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...

qiller•31m 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

entaloneralie•28m 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

krick•24m 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.

DoctorOetker•15m ago
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 :)

lioeters•15m 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.

noobermin•14m 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).

All elementary functions from a single binary operator

https://arxiv.org/abs/2603.21852
95•pizza•2h ago•38 comments

Haunt, the 70s text adventure game, is now playable on a website

https://haunt.madebywindmill.com
20•jscalo•1h ago•2 comments

Taking on CUDA with ROCm: 'One Step After Another'

https://www.eetimes.com/taking-on-cuda-with-rocm-one-step-after-another/
96•mindcrime•5h ago•77 comments

Optimization of 32-bit Unsigned Division by Constants on 64-bit Targets

https://arxiv.org/abs/2604.07902
40•mpweiher•19h ago•0 comments

State of Homelab 2026

https://mrlokans.work/posts/state-of-homelab-2026/
33•swq115•2h ago•8 comments

Show HN: boringBar – a taskbar-style dock replacement for macOS

https://boringbar.app/
283•a-ve•11h ago•168 comments

Bring Back Idiomatic Design (2023)

https://essays.johnloeber.com/p/4-bring-back-idiomatic-design
500•phil294•16h ago•254 comments

DIY Soft Drinks

https://blinry.org/diy-soft-drinks/
309•_Microft•11h ago•86 comments

Ask HN: What Are You Working On? (April 2026)

167•david927•12h ago•481 comments

Most people can't juggle one ball

https://www.lesswrong.com/posts/jTGbKKGqs5EdyYoRc/most-people-can-t-juggle-one-ball
289•surprisetalk•3d ago•89 comments

A Perfectable Programming Language

https://alok.github.io/lean-pages/perfectable-lean/
79•yuppiemephisto•7h ago•27 comments

I gave every train in New York an instrument

https://www.trainjazz.com/
239•joshuawolk•2d ago•44 comments

Show HN: Oberon System 3 runs natively on Raspberry Pi 3 (with ready SD card)

https://github.com/rochus-keller/OberonSystem3Native/releases
174•Rochus•15h ago•36 comments

Uncharted island soon to appear on nautical charts

https://www.awi.de/en/about-us/service/press/single-view/unkartierte-insel-demnaechst-auf-seekart...
60•tannhaeuser•8h ago•25 comments

Google removes "Doki Doki Literature Club" from Google Play

https://bsky.app/profile/serenityforge.com/post/3mj3r4nbiws2t
357•super256•8h ago•172 comments

Tell HN: Docker pull fails in Spain due to football Cloudflare block

722•littlecranky67•16h ago•282 comments

We have a 99% email reputation, but Gmail disagrees

https://blogfontawesome.wpcomstaging.com/we-have-a-99-email-reputation-gmail-disagrees/
200•em-bee•15h ago•189 comments

Apple's accidental moat: How the "AI Loser" may end up winning

https://adlrocha.substack.com/p/adlrocha-how-the-ai-loser-may-end
51•walterbell•1h ago•41 comments

Investigating How Long-Distance Couples Use Digital Games to Facilitate Intimacy

https://arxiv.org/abs/2505.09509
78•radeeyate•12h ago•22 comments

The peril of laziness lost

https://bcantrill.dtrace.org/2026/04/12/the-peril-of-laziness-lost/
352•gpm•8h ago•115 comments

Seven countries now generate 100% of their electricity from renewable energy

https://www.the-independent.com/tech/renewable-energy-solar-nepal-bhutan-iceland-b2533699.html
536•mpweiher•15h ago•279 comments

Happy Map

https://pudding.cool/2026/02/happy-map/
229•surprisetalk•5d ago•42 comments

JVM Options Explorer

https://chriswhocodes.com/vm-options-explorer.html
180•0x54MUR41•18h ago•78 comments

The End of Eleventy

https://brennan.day/the-end-of-eleventy/
208•ValentineC•1d ago•175 comments

Exploiting the most prominent AI agent benchmarks

https://rdi.berkeley.edu/blog/trustworthy-benchmarks-cont/
502•Anon84•1d ago•130 comments

Phyphox – Physical Experiments Using a Smartphone

https://phyphox.org/
200•_Microft•19h ago•32 comments

Pro Max 5x quota exhausted in 1.5 hours despite moderate usage

https://github.com/anthropics/claude-code/issues/45756
562•cmaster11•15h ago•514 comments

Is Math Big or Small?

https://chessapig.github.io/talks/Big-Small
21•robinhouston•20h ago•4 comments

EasyPost (YC S13) Is Hiring

https://www.easypost.com/careers
1•jstreebin•11h ago

A Tour of Oodi

https://blinry.org/oodi/
120•zdw•3d ago•40 comments