Re:All elementary functions from a single binary operator
by qbit42 on Monday April 13, 2026 @11:27AM
(#47753411)
I think there is still an implicit restriction on the complexity of the operator for this to be interesting. Otherwise you could design an operator which accepts a pair x,y and performs one of 2^k elementary binary operations by reading off the first k bits of x and applying the specified operation on the remainder of x and y. (This is kind of like how real-valued computational models become too powerful for complexity theory to work if you allow bitwise operations.)
[ Parent
| on HN ]
Re:All elementary functions from a single binary operator
by lugao on Monday April 13, 2026 @11:41AM
(#47753647)
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 ln isn't a cheat code because the goal is purely topological. The paper just proves that this massive, diverse family of continuous math can be mapped perfectly onto a uniform binary tree, without secretly burying a state machine inside the operator.
Re:All elementary functions from a single binary operator
by gus_massa on Monday April 13, 2026 @11:52AM
(#47753848)
> 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.
Re:All elementary functions from a single binary operator
by drdeca on Monday April 13, 2026 @12:13PM
(#47754225)
Different sense of “branching”
Re:All elementary functions from a single binary operator
by gus_massa on Monday April 13, 2026 @12:30PM
(#47754500)
Yep.
Re:All elementary functions from a single binary operator
by lugao on Tuesday April 14, 2026 @05:46AM
(#47763373)
Well, the paper explicitly takes the principal branch to solve this.
So it isn't exploiting the branching for computation.
Re:All elementary functions from a single binary operator
by gus_massa on Tuesday April 14, 2026 @01:13PM
(#47768366)
I agree, as the sibling comment there are two different things that are named "branches". Anyway, to get the principal branch in the microprocessor it's necessary to implement "atan2" that has a lot of special cases.
For example, IIRC ln( -inf.0 + y * i ) = ´+inf.0 + pi * sign(y)