DeepAI AI Chat
Log In Sign Up

A Novel Approach to Generate Correctly Rounded Math Libraries for New Floating Point Representations

by   Jay P. Lim, et al.

Given the importance of floating-point (FP) performance in numerous domains, several new variants of FP and its alternatives have been proposed (e.g., Bfloat16, TensorFloat32, and Posits). These representations do not have correctly rounded math libraries. Further, the use of existing FP libraries for these new representations can produce incorrect results. This paper proposes a novel approach for generating polynomial approximations that can be used to implement correctly rounded math libraries. Existing methods generate polynomials that approximate the real value of an elementary function f(x) and produce wrong results due to approximation errors and rounding errors in the implementation. In contrast, our approach generates polynomials that approximate the correctly rounded value of f(x) (i.e., the value of f(x) rounded to the target representation). It provides more margin to identify efficient polynomials that produce correctly rounded results for all inputs. We frame the problem of generating efficient polynomials that produce correctly rounded results as a linear programming problem. Our approach guarantees that we produce the correct result even with range reduction techniques. Using our approach, we have developed correctly rounded, yet faster, implementations of elementary functions for multiple target representations.


RLIBM-32: High Performance Correctly Rounded Math Libraries for 32-bit Floating Point Representations

This paper proposes a set of techniques to develop correctly rounded mat...

RLIBM-PROG: Progressive Polynomial Approximations for Fast Correctly Rounded Math Libraries

This paper presents a novel method for generating a single polynomial ap...

Computing Integer Powers in Floating-Point Arithmetic

We introduce two algorithms for accurately evaluating powers to a positi...

Indirect predicates for geometric constructions

Geometric predicates are a basic ingredient to implement a vast range of...

Computing hypergeometric functions rigorously

We present an efficient implementation of hypergeometric functions in ar...

Sound Approximation of Programs with Elementary Functions

Elementary function calls are a common feature in numerical programs. Wh...