Fast Trigonometric Functions using the RLIBM Approach

๐Ÿ“… 2025-10-15
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Conventional 32-bit floating-point trigonometric functions suffer from range reduction errors due to insufficient ฯ€ precision, violating correct rounding guarantees under IEEE 754. Method: This paper proposes a co-designed high-precision range reduction and polynomial approximation scheme. It employs mixed floating-pointโ€“integer arithmetic with a ฯ€ constant of significantly higher precision than IEEE 754 binary32, tightly bounding error propagation during reduction; constructs provably correctly rounded piecewise polynomials within the RLIBM framework; and unifies support for all IEEE 754 binary32 representations and five rounding modes. Contribution/Results: Our method achieves correct rounding across the entire input domain while matching the performance of mainstream math libraries. It is the first approach to deliver efficient, formally verifiable correctness for 32-bit floating-point trigonometric functions under multiple representations and rounding modes.

Technology Category

Application Category

๐Ÿ“ Abstract
This paper describes our experience developing polynomial approximations for trigonometric functions that produce correctly rounded results for multiple representations and rounding modes using the RLIBM approach. A key challenge with trigonometric functions concerns range reduction with "pi", which reduces a given input in the domain of a 32-bit float to a small domain. Any rounding error in the value of "pi" is amplified during range reduction, which can result in wrong results. We describe our experience implementing fast range reduction techniques that maintain a large number of bits of "pi" both with floating-point and integer computations. The resulting implementations for trigonometric functions are fast and produce correctly rounded results for all inputs for multiple representations up to 32-bits with a single implementation.
Problem

Research questions and friction points this paper is trying to address.

Developing polynomial approximations for trigonometric functions
Addressing range reduction challenges with pi
Ensuring correctly rounded results for multiple representations
Innovation

Methods, ideas, or system contributions that make the work stand out.

Fast polynomial approximations for trigonometric functions
High-precision range reduction with extended pi bits
Single implementation supports multiple representations and rounding modes
๐Ÿ”Ž Similar Papers
No similar papers found.