A dynamic program analysis to find floating-point accuracy problems
Open Access
- 11 June 2012
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 47 (6) , 453-462
Abstract
Programs using floating-point arithmetic are prone to accuracy problems caused by rounding and catastrophic cancellation. These phenomena provoke bugs that are notoriously hard to track down: the program does not necessarily crash and the results are not necessarily obviously wrong, but often subtly inaccurate. Further use of these values can lead to catastrophic errors. In this paper, we present a dynamic program analysis that supports the programmer in finding accuracy problems. Our analysis uses binary translation to perform every floating-point computation side by side in higher precision. Furthermore, we use a lightweight slicing approach to track the evolution of errors. We evaluate our analysis by demonstrating that it catches wellknown floating-point accuracy problems and by analyzing the Spec CFP2006 floating-point benchmark. In the latter, we show how our tool tracks down a catastrophic cancellation that causes a complete loss of accuracy leading to a meaningless program result. Finally, we apply our program to a complex, real-world bioinformatics application in which our program detected a serious cancellation. Correcting the instability led not only to improved quality of the result, but also to an improvement of the program's run time.In this paper, we present a dynamic program analysis that supports the programmer in finding accuracy problems. Our analysis uses binary translation to perform every floating-point computation side by side in higher precision. Furthermore, we use a lightweight slicing approach to track the evolution of errors. We evaluate our analysis by demonstrating that it catches wellknown floating-point accuracy problems and by analyzing the SpecfiCFP2006 floating-point benchmark. In the latter, we show how our tool tracks down a catastrophic cancellation that causes a complete loss of accuracy leading to a meaningless program result. Finally, we apply our program to a complex, real-world bioinformatics application in which our program detected a serious cancellation. Correcting the instability led not only to improved quality of the result, but also to an improvement of the program's run time.Keywords
This publication has 12 references indexed in Scilit:
- Static Analysis of Finite Precision Computations2011
- BALL - biochemical algorithms library 1.3BMC Bioinformatics, 2010
- Handbook of Floating-Point Arithmetic2010
- Towards an Industrial Use of FLUCTUAT on Safety-Critical Avionics Software2009
- Valgrind2007
- Safe bounds in linear and mixed-integer linear programmingMathematical Programming, 2004
- What every computer scientist should know about floating-point arithmeticACM Computing Surveys, 1991
- An accurate elementary mathematical library for the IEEE floating point standardACM Transactions on Mathematical Software, 1991
- Alliances and foreign policy todayAustralian Outlook, 1983
- A floating-point technique for extending the available precisionNumerische Mathematik, 1971