Floating-Point Usage on GitHub: A Large-Scale Study of Statically Typed Languages
Andrea Gilot, Tobias Wrigstad, Eva Darulová
Uppsala University
Key points
From the paper's conclusion- We focus on statically typed languages to allow our study to scale to millions of repositories.
Abstract
Reasoning about floating-point arithmetic is notoriously hard. While static and dynamic analysis techniques or program repair have made significant progress, more work is still needed to make them relevant to real-world code. On the critical path to that goal is understanding what real-world floating-point code looks like. To close that knowledge gap, this paper presents the first large-scale empirical study of floating-point arithmetic usage across public GitHub repositories. We focus on statically typed languages to allow our study to scale to millions of repositories. We follow state-of the art mining practices including random sampling and filtering based on only intrinsic properties to avoid bias, and identify floating-point usage by searching for keywords in the source code, and programming language constructs (e.g., loops) by parsing the code. Our evaluation supports the claim often made in papers that floating-point arithmetic is widely used. Comparing statistics such as size and usage of certain constructs and functions, we find that benchmarks used in literature to evaluate automated reasoning techniques for floating-point arithmetic are in certain aspects representative of 'real-world' code, but not in all. We publish a dataset of 10 million real-world floating-point functions extracted from our study. We demonstrate in a case study how it may be used to identify new floating-point benchmarks and help future techniques for floating-point arithmetic to be designed and evaluated to match actual users' expectations.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- FPScan: An Automated Constraint-Based Analyzer for Floating-Point Anomaly DetectionarXiv · 2026
- Mathematically-Guided Detection of Floating-Point ErrorsProceedings of the ACM on Software Engineering · 2026
- Accurate Residues for Floating-Point DebuggingProceedings of the ACM on Programming Languages · 2026
- 8 Bits to End the Loudness War: Lossless Floating-Point Compression for Audio StreamsarXiv · 2026
- What Bloats Your Floats? Right-Sizing Numerical Precision for Scientific ComputingarXiv · 2026
- Ziv: A Language for Correctly Rounded Math LibrariesarXiv · 2026