HN
Today

All elementary functions from a single binary operator

A new paper reveals that a single binary operator, eml(x,y)=exp(x)-ln(y), alongside the constant 1, can generate all elementary functions, including arithmetic operations, transcendentals, and constants like e and pi. This unexpected discovery simplifies continuous mathematics to a single primitive, much like NAND gates for Boolean logic. Hacker News finds this fundamental insight mind-blowing, sparking discussions about hardware implications and its elegance in mathematical representation.

22
Score
10
Comments
#1
Highest Rank
20h
on Front Page
First Seen
Apr 13, 3:00 AM
Last Seen
Apr 13, 10:00 PM
Rank Over Time
211121112243369912111519

The Lowdown

A groundbreaking paper introduces eml(x,y)=exp(x)-ln(y) as a universal binary operator capable of generating the entire repertoire of a scientific calculator. Discovered through systematic search, this operator, combined with the constant 1, provides a singular primitive for continuous mathematics, a concept previously unknown.

  • Universal Functionality: It generates constants like e, pi, and i, all standard arithmetic operations (addition, subtraction, multiplication, division, exponentiation), and common transcendental and algebraic functions.
  • Elegant Structure: Every function can be expressed as a binary tree of identical eml nodes, establishing a grammar as simple as S -> 1 | eml(S,S).
  • Practical Applications: This uniform structure facilitates gradient-based symbolic regression, allowing for the exact recovery of closed-form elementary functions from numerical data, even at shallow tree depths.

This discovery challenges the long-held assumption that continuous mathematics requires multiple distinct operations, offering a remarkably elegant and powerful simplification.

The Gossip

Hardware Horizons

Commenters enthusiastically discuss the potential hardware implications of a single `eml` operator. Ideas range from building analog scientific calculators entirely with `eml` gates to comparing the performance of a highly-optimized `eml` hardware implementation against traditional math coprocessors, considering the efficiency of functions like `exp()` and `ln()` for specific operations.

Universal Primitives & Parallels

Many users immediately drew parallels between `eml` and other fundamental, minimalist systems capable of universal computation or expression. Comparisons were made to Boolean logic gates (where a single gate suffices), the Y combinator in functional programming, and the esoteric programming language Brainf*ck, highlighting the elegance of deriving complex functionality from such a simple, singular primitive.

Practicality Ponderings

A significant thread focused on the practical performance and derivation of basic arithmetic. Questions arose about how fundamental operations like addition would be performed using only `eml`, with some wondering if this approach would be 'dreadfully slow' for integer math. Others provided explanations on how functions like addition are indeed derived through the operator's capabilities.

Mathematical Musings

Some commenters delved into deeper mathematical contexts and implications. Discussions included distinguishing `eml`-generated functions from hypergeometric functions and appreciating the 'tightness' of encoding complex mathematical functions using just `eml` and the constant 1, suggesting profound implications for mathematical representation and theory.