Table of Contents
Fetching ...

OFP-Repair: Repairing Floating-point Errors via Original-Precision Arithmetic

Youshuai Tan, Zishuo Ding, Jinfu Chen, Weiyi Shang

TL;DR

OFP-Repair tackles the challenge of floating-point errors by distinguishing errors repairable within original-precision arithmetic from those requiring high-precision computation. It detects original-precision-repairable errors via input-condition-number analysis and repairs them using Taylor-series patches that avoid cancellation, all without high-precision program variants. Across ACESO benchmarks, OFP-Repair delivers dramatically higher accuracy than the baseline and extends to real-world open bug reports, repairing multiple GNU Scientific Library issues. The work demonstrates practical applicability with favorable results and signals potential adoption within software development workflows to improve numerical reliability.

Abstract

Errors in floating-point programs can lead to severe consequences, particularly in critical domains such as military, aerospace, and financial systems, making their repair a crucial research problem. In practice, some errors can be fixed using original-precision arithmetic, while others require high-precision computation. Developers often avoid addressing the latter due to excessive computational resources required. However, they sometimes struggle to distinguish between these two types of errors, and existing repair tools fail to assist in this differentiation. Most current repair tools rely on high-precision implementations, which are time-consuming to develop and demand specialized expertise. Although a few tools do not require high-precision programs, they can only fix a limited subset of errors or produce suboptimal results. To address these challenges, we propose a novel method, named OFP-Repair.On ACESO's dataset, our patches achieve improvements of three, seven, three, and eight orders of magnitude across four accuracy metrics. In real-world cases, our method successfully detects all five original-precision-repairable errors and fixes three, whereas ACESO only repairs one. Notably, these results are based on verified data and do not fully capture the potential of OFP-Repair. To further validate our method, we deploy it on a decade-old open bug report from GNU Scientific Library (GSL), successfully repairing five out of 15 bugs. The developers have expressed interest in our method and are considering integrating our tool into their development workflow. We are currently working on applying our patches to GSL. The results are highly encouraging, demonstrating the practical applicability of our technique.

OFP-Repair: Repairing Floating-point Errors via Original-Precision Arithmetic

TL;DR

OFP-Repair tackles the challenge of floating-point errors by distinguishing errors repairable within original-precision arithmetic from those requiring high-precision computation. It detects original-precision-repairable errors via input-condition-number analysis and repairs them using Taylor-series patches that avoid cancellation, all without high-precision program variants. Across ACESO benchmarks, OFP-Repair delivers dramatically higher accuracy than the baseline and extends to real-world open bug reports, repairing multiple GNU Scientific Library issues. The work demonstrates practical applicability with favorable results and signals potential adoption within software development workflows to improve numerical reliability.

Abstract

Errors in floating-point programs can lead to severe consequences, particularly in critical domains such as military, aerospace, and financial systems, making their repair a crucial research problem. In practice, some errors can be fixed using original-precision arithmetic, while others require high-precision computation. Developers often avoid addressing the latter due to excessive computational resources required. However, they sometimes struggle to distinguish between these two types of errors, and existing repair tools fail to assist in this differentiation. Most current repair tools rely on high-precision implementations, which are time-consuming to develop and demand specialized expertise. Although a few tools do not require high-precision programs, they can only fix a limited subset of errors or produce suboptimal results. To address these challenges, we propose a novel method, named OFP-Repair.On ACESO's dataset, our patches achieve improvements of three, seven, three, and eight orders of magnitude across four accuracy metrics. In real-world cases, our method successfully detects all five original-precision-repairable errors and fixes three, whereas ACESO only repairs one. Notably, these results are based on verified data and do not fully capture the potential of OFP-Repair. To further validate our method, we deploy it on a decade-old open bug report from GNU Scientific Library (GSL), successfully repairing five out of 15 bugs. The developers have expressed interest in our method and are considering integrating our tool into their development workflow. We are currently working on applying our patches to GSL. The results are highly encouraging, demonstrating the practical applicability of our technique.

Paper Structure

This paper contains 23 sections, 3 equations, 6 figures, 2 tables.

Figures (6)

  • Figure 1: The approximation performance of Taylor series.
  • Figure 2: The double-precision floating-point representations of $x$ and $y$.
  • Figure 3: One precision-specific code snippet in GLIBC.
  • Figure 4: An overview of OFP-Repair.
  • Figure 5: Accuracy improvements by ACESO and our method. Results are presented in terms of both absolute and relative errors, covering both the stable and decayed regions of the input ranges. The black arrowed lines originate from the maximum error of the original programs under our test inputs, with arrowheads indicating the maximum error after ACESO's fixing. Similarly, the blue arrowed lines depict the original maximum errors pointing to the errors improved by our proposed method.
  • ...and 1 more figures