Live data from Hacker News

All elementary functions from a single binary operator

arxiv.org

271–280 of 317 posts

Re: All elementary functions from a single binary operator

#271

Earlier quoted context omitted.

I’m fairly certain that the difference between the approaches is that the f(x,y) function you mentioned requires limits to represent certain concepts while the eml approach is essentially a tree or a chain of computations meant to represent a model of a system.

Computing exp or ln is an infinite series, and vastly more compute. Hiding series behind a name doesn’t make them free to compute.

You're completely missing the point here.

You can reduce all Boolean logic to NAND, but that doesn't actually mean that semiconductor fabs translate their HDL to NAND gates, because it is possible to build complex gates that directly implement higher level operations in a single gate.

Your "cost of computation" objection can be easily resolved by adding more operators, which makes it boring from a research perspective.

Meanwhile the loss of expressivity can only be compensated by encoding algorithms directly into the expression tree. Your objection that an infinite series is a bad thing rings hollow, since you now introduce the concept of an infinitely sized expression tree. That sounds much more impractical than implementing an algorithm for the exponential and logarithm functions.

Re: All elementary functions from a single binary operator

#272

Earlier quoted context omitted.

Computing exp or ln is an infinite series, and vastly more compute. Hiding series behind a name doesn’t make them free to compute.

You're completely missing the point here. You can reduce all Boolean logic to NAND, but that doesn't actually mean that semiconductor fabs translate their HDL to NAND gates, because it is possible to build complex gates that directly implement higher level operations in a single gate. Your "cost of computation" objection can be easily resolved by adding more operators, which makes it boring from a research perspectiv…

Show me a way to physically compute exp or ln that is less gates than add. More gates means costlier in $, more energy in compute, and for these functions, higher latency.

You don’t get to make up free ops, claim there is no cost in reality, and hand wave away reality.

There are infinitely many ways to do what the paper did. There’s no gain other than it’s pretty. It loses on every practical front to simply using current ops and architectures.

Re: All elementary functions from a single binary operator

#273

Earlier quoted context omitted.

The exp and ln are infinite series. Exp is roughly the infinite series for cos AND the infinite series for sin. Hiding that every op is an infinite series behind a name doesn’t make things free. It just makes even trivial ops like 1+2 vastly more work.

They are not infinite series per se. They can be represented by infinite series in several ways but there are standard ways to define them that do not involve infinite series. The logarithm in particular is not even represented by an infinite series (in form of Taylor expansion) defined in the whole complex plane. And knowledge/use of trigonometric functions greatly precedes such infinite series representations. More…

Any transcendental function can be produced by arithmetic, since its complete for R.

Go ahead and show how to compute exp or ln without an infinite series without circular reasoning. You can’t, since they’re transcendental.

There are infinitely many ways to make these binary operators. Picking extremely high compute cost ones really doesn’t make a good basis for computation.

Re: All elementary functions from a single binary operator

#274

Earlier quoted context omitted.

Yes it can, by using the same infinite series that exp and ln use to compute. This one just costs less in money, hardware, energy, and is faster for basically every basic op.

I think the point is that it is _finite_. if you allow infinite expressions then the basic monomial basis or quotients thereof are “even simpler”

It’s only finite by putting the infinite series into an operation.

And the basic monomial basis is not a single binary operation capable of reproducing the set of basic arithmetic ops. If you want trivial and basic, pick Peano postulates. But that’s not what this thread was about.

Re: All elementary functions from a single binary operator

#275

Earlier quoted context omitted.

You're completely missing the point here. You can reduce all Boolean logic to NAND, but that doesn't actually mean that semiconductor fabs translate their HDL to NAND gates, because it is possible to build complex gates that directly implement higher level operations in a single gate. Your "cost of computation" objection can be easily resolved by adding more operators, which makes it boring from a research perspectiv…

Show me a way to physically compute exp or ln that is less gates than add. More gates means costlier in $, more energy in compute, and for these functions, higher latency. You don’t get to make up free ops, claim there is no cost in reality, and hand wave away reality. There are infinitely many ways to do what the paper did. There’s no gain other than it’s pretty. It loses on every practical front to simply using cur…

The feasibility of memristor analog circuits is evident, and I believe this paper represents a valuable early exploration. We've been constrained by Boolean logic for quite some time now.

Re: All elementary functions from a single binary operator

#276

Earlier quoted context omitted.

You're completely missing the point here. You can reduce all Boolean logic to NAND, but that doesn't actually mean that semiconductor fabs translate their HDL to NAND gates, because it is possible to build complex gates that directly implement higher level operations in a single gate. Your "cost of computation" objection can be easily resolved by adding more operators, which makes it boring from a research perspectiv…

Show me a way to physically compute exp or ln that is less gates than add. More gates means costlier in $, more energy in compute, and for these functions, higher latency. You don’t get to make up free ops, claim there is no cost in reality, and hand wave away reality. There are infinitely many ways to do what the paper did. There’s no gain other than it’s pretty. It loses on every practical front to simply using cur…

> no gain other than it’s pretty

Conceptual elegance is worth something, isn't it? I don't mean just aesthetic pleasure, as in recreational mathematics, but there's often (not always) value in being able to succinctly describe a wide range of phenomena with a small number of primitives. It could open up new ways of understanding or working that wasn't possible before. Not saying this specific discovery fits the description, but it seems too early to dismiss the idea entirely based on its im/practicality compared to existing solutions.

Aren't there examples in the history of mathematics, where a new idea was criticized for being impractical, then later found to have applications or implications, possibly unexpected even to the person who discovered it?

Re: All elementary functions from a single binary operator

#277

Built a JS implementation today — monogate https://explorer-taupe-five.vercel.app · npm install monogate The interesting engineering problem was negation. The paper's SI gives one construction; we independently derived a two-regime approach — tower formula for y≤0, shift formula for y>0 — that stays stable to |y|<708 in IEEE 754. We also extended to ℂ. After seeing pveierland's result in this thread (i constructible…

[dead]

Re: All elementary functions from a single binary operator

#278

I couldn't find any information on this, but is it possible that given how nicely exponentiation and logarithms differentiate and integrate, is it possible that this operator may be useful to simplify the process of finding symbolic solutions to integrals and derivatives?

It transform a simple expression like x+y into a long chain of "eml" applications, so: Derivatives: No. Exercise: Write the derivative of f(x)=eml(x,x) Integrals: No. No. No. Integrals of composition are a nightmare, and here they use long composition chain like g(x)=eml(1,eml(eml(1,x),1)).

Agreed on integrals, but the derivative is relatively simple?

If f(x) = exp(x) - ln(x) then f’(x) = exp(x) - 1/x, which is representable in eml form as well.

To the overall point though, I don’t think it helps make derivatives easier though. To refactor a function to eml’s is far more work than refactoring into something that’s trivially differentiable with the product rule and chain rule.

Re: All elementary functions from a single binary operator

#279

Earlier quoted context omitted.

I think this is the novel bit: > This includes constants such as e, pi, and i ; arithmetic operations including addition, subtraction, multiplication, division, and exponentiation as well as the usual transcendental and algebraic functions .

And those come from the infinite series needed to compute exp and ln. They’re just as much work either way. The exp and ln way are vastly costlier for every op, including simply adding 1 and 2.

It's not about being costly or not, this is completely irrelevant to the point being made. eml is just some abstract function, that maps ℝ² to ℝ. Same as every other mathematical function it is only really defined by the infinite set of correspondences from one value to some other value. It is NOT exp(x) - ln(y), same as exp is not a series (as you wrongfully stated in another comment). exp can be expressed (and/or defined) as a series to a mathematician familiar with a notion of series, and eml can be expressed as exp(y) - ln(y) to a mathematician familiar with exp and ln. They can also be expressed/defined multiple other ways.

I am not claiming this is better than 1/(x-y) in any way (I have no idea, maybe it isn't if you look closely enough), but you are simply arguing against the wrong thing. Author didn't claim eml to be computationally efficient (it even feels weird to say that, since computational efficiency is not a trait of a mathematical function, but of a computer architecture implementing some program) or anything else, only that (eml, 1) are enough to produce every number and function that (admittedly, somewhat vaguely defined) a scientific calculator can produce.

However, I want to point out that it's weird 1/(x-y) didn't appear on that graph in Figure 1, since if it's as powerful as eml, it should have all the same connections as eml, and it's a pity Odrzywołek's paper misses it.

Re: All elementary functions from a single binary operator

#280
post #197

Earlier quoted context omitted.

Exactly! If you didn't strictly limit the operator's complexity, you could just smuggle a Turing machine in via bitwise logic and turn the whole thing into a parlor trick. The beauty here is that eml(x,y) is a pure, continuous analytical function with no hidden branching whatsoever. To clarify my earlier point: the author isn't trying to build a practical calculator or generate human-readable algebra. Using exp and l…

> The beauty here is that eml(x,y) is a pure, continuous analytical function with no hidden branching whatsoever. They use the complex version of logarithm, that has a lot of branching problems.

Well, the paper explicitly takes the principal branch to solve this.

So it isn't exploiting the branching for computation.

Post reply on HN