AutoNumerics-Zero: Automated Discovery of State-of-the-Art Mathematical Functions
Abstract
Lay Summary
Essential mathematical functions, like exponentials, are fundamental to scientific simulations, but computers cannot calculate them directly. Instead, computers have to approximate these functions using basic arithmetic operations like addition and multiplication. Traditionally, these approximations were designed by mathematicians to achieve arbitrary accuracy; the higher the accuracy, the higher the cost of the calculation. Modern computer processors, however, use finite-precision data types, which means that any accuracy beyond the processor's limit is typically wasted. We hypothesized that optimizing specifically for finite-precision limits could yield much more efficient programs. We developed AutoNumerics-Zero, an evolutionary algorithm that starts with empty code and searches for computer programs from scratch. Without prior mathematical knowledge, our method constructs novel, highly efficient code. In particular, it discovered a ten-operation program that calculates exponentials to 14 significant figures. This surpasses the accuracy of previously known approximations of this size by more than a million times. Our work indicates that tailoring mathematical approximations to the constraints of modern computing can unlock significant, previously overlooked efficiency gains.