Floating-Point Usage on GitHub: A Large-Scale Study of Statically Typed Languages
Andrea Gilot, Tobias Wrigstad, Eva Darulova
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.
CCS Concepts: • Software and its engineering → Software libraries and repositories; Automated static analysis; • Information systems → Data mining.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6a825194-d0a0-4d18-a6e4-7f59a9620f2cBuilds on7
- Detecting floating-point errors via atomic conditionsDaming Zou, Muhan Zeng, Yingfei Xiong, Zhoulai Fu et al.POPL 2020 · 45 citations
- Scalable yet rigorous floating-point error analysisArnab Das, Ian Briggs, Ganesh Gopalakrishnan, Sriram Krishnamoorthy et al.SC 2020 · 36 citations
- Efficient generation of error-inducing floating-point inputs via symbolic executionHui Guo, Cindy Rubio-GonzálezICSE 2020 · 27 citations
- Oracle-free repair synthesis for floating-point programsDaming Zou, Yuchen Gu, Yuanfeng Shi, Mingzhe Wang et al.OOPSLA 2022 · 9 citations
- Predicting Performance and Accuracy of Mixed-Precision Programs for Precision TuningYutong Wang, Cindy Rubio-GonzálezICSE 2024 · 7 citations
Related papers
- How Bad Can It Git? Characterizing Secret Leakage in Public GitHub RepositoriesMichael Meli, Matthew R. McNiece, Bradley ReavesNDSS 2019 · 130 citations
- An Empirical Study of Suppressed Static Analysis WarningsHuimin Hu, Yingying Wang, Julia Rubin, Michael PradelFSE 2025 · 1 citation
- An empirical study on the effectiveness of static C code analyzers for vulnerability detectionStephan Lipp, Sebastian Banescu, Alexander PretschnerISSTA 2022 · 99 citations
- Designing types for R, empiricallyAlexi Turcotte, Aviral Goel, Filip Krikava, Jan VitekOOPSLA 2020 · 9 citations
- Spying on the Floating Point Behavior of Existing, Unmodified Scientific ApplicationsPeter A. Dinda, Alex Bernat, Conor HetlandHPDC 2020 · 20 citations
