NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Cross-Platform Benchmark for Interval Computation Libraries

Xuan Tang, Zachary Ferguson, Teseo Schneider, Denis Zorin, Shoaib Kamil, Daniele PanozzoPPAM 2021 · DOI

TL;DR

This paper introduces the first comprehensive benchmark for interval computation libraries, addressing the lack of standardized testing and the critical need for reliable interval arithmetic in scientific computing. By comparing popular C/C++ libraries across various platforms, they reveal significant differences in correctness, speed, and consistency, highlighting filib as the current best all-around option.

What Problem Does This Paper Address?

Floating-point arithmetic, the backbone of most scientific computations, is inherently imprecise due to rounding errors. Interval arithmetic offers a powerful solution by representing numbers as ranges (intervals) that are guaranteed to contain the true result, thus providing certifiable correctness. This is crucial for applications demanding high reliability, such as computer-aided design, geometric computing, and precision manufacturing. However, despite its importance, interval arithmetic support is not standardized, and existing libraries often exhibit inconsistencies and bugs, especially across different hardware architectures, operating systems, and compiler versions. This makes it difficult for developers to choose a reliable library and for library developers to ensure the quality of their implementations.

Methods

The authors developed a benchmark designed to rigorously test interval computation libraries across four key dimensions: correctness, interval size, speed, and consistency/portability.

  • Correctness: They generated a suite of 28 basic expressions and used 104 expressions from the FPBench benchmark. For each expression, they generated one million random inputs and computed the exact solution using arbitrary-precision arithmetic (Mathematica) to serve as a ground truth.
  • Interval Size: This metric evaluates how "tight" the computed intervals are. They used a rational subtraction method to quantify the size of the resulting intervals.
  • Speed: Performance was measured by executing each expression 1,000 times for each of 10,000 inputs and accumulating the total execution time.
  • Consistency and Portability: The benchmark was deployed on four distinct platforms (Windows, macOS on Intel and ARM, and Linux) with different compilers to assess how consistently libraries perform and if their results vary across environments.

The benchmark specifically targets limitations in how libraries handle basic arithmetic, transcendental functions, and composite expressions, as well as the impact of hardware rounding mode control and software-based interval computation strategies.

Datasets

The paper introduces a new benchmark suite for interval computation libraries. This benchmark includes:

  • 28 custom-designed basic expressions covering arithmetic operations, transcendental functions, and combinations thereof.
  • 104 expressions adapted from the FPBench benchmark, which is a well-known suite for evaluating floating-point accuracy across various application domains.

The benchmark also utilizes a large number of randomly generated inputs (one million per expression) to ensure thorough testing.

Key Insights and Ideas

  • No Silver Bullet: The study reveals that no single library excels in all aspects. Libraries that rely on hardware rounding mode control (like Boost and filib++'s native_switched mode) can be faster but are more prone to correctness issues and inconsistencies across platforms.
  • The Danger of Hardware Rounding: While hardware rounding modes can speed up computations, they introduce subtle correctness problems, especially with transcendental functions and composite expressions. Boost, for instance, fails on several transcendental functions due to this reliance.
  • Software Implementations Shine: Pure software implementations, like filib and filib++'s pred_succ and multiplicative modes, demonstrate superior correctness across the board, even though they might incur a performance penalty.
  • filib is the Current Champion: For a balance of correctness, consistency, portability, and reasonable speed, filib emerges as the most robust and reliable option among those tested.
  • filib++'s Modes Matter: filib++ offers different modes, and their performance and correctness vary significantly. The pred_succ and multiplicative modes are generally more correct than native_switched.

Key Results

  • Correctness: Only filib and filib++'s pred_succ and multiplicative modes passed all correctness tests. Boost failed on transcendental functions, and filib++'s native_switched mode had issues with some FPBench expressions. BIAS produced incorrect intervals for certain composite expressions.
  • Interval Size: Libraries using hardware rounding modes generally produced smaller intervals for purely arithmetic expressions, but the differences were minor. For expressions with transcendental functions, interval sizes became less predictable.
  • Speed: Boost was consistently the slowest. BIAS was also slower than filib. Among filib++'s modes, multiplicative was the fastest, followed by pred_succ, with native_switched being the slowest, especially for complex expressions.
  • Consistency: filib and filib++'s pred_succ and multiplicative modes showed consistent results across platforms. Boost and filib++'s native_switched mode exhibited platform-dependent variations in interval size and false positive rates.
  • False Positives: While no library produced false negatives (missing a collision), the number of false positives varied, with Boost and filib++'s native_switched showing architectural differences.

Limitations and Future Work

  • Benchmark Completeness: The authors acknowledge that their benchmark, while extensive, cannot exhaustively test all possible combinations of operations and operands. A library passing their tests might still contain errors.
  • Library Maintenance: BIAS is noted as not being actively maintained, and filib++ has not been updated since 2011, limiting its compatibility with modern systems.
  • Future Work: The authors provide their benchmark code and scripts on GitHub, encouraging its use for testing existing libraries and guiding the development of future interval libraries. They also suggest that the benchmark can be extended to include more complex real-world applications.

Summary updated

BibTeX
@inproceedings{tang2021cross,
  author = {Xuan Tang and Zachary Ferguson and Teseo Schneider and Denis Zorin and Shoaib Kamil and Daniele Panozzo},
  title = {{A Cross-Platform Benchmark for Interval Computation Libraries}},
  booktitle = {PPAM},
  year = {2021},
  doi = {10.1007/978-3-031-30445-3\_35},
}
Figure