Stabilizing Floating-Point Programs Using Provenance Analysis

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10145)


Floating-point arithmetic is a loosely standardized approximation of real arithmetic available on many computers today. Architectural and compiler differences can lead to diverse calculations across platforms, for the same input. If left untreated, platform dependence, called volatility in this paper, seriously interferes with result reproducibility and, ultimately, program portability. We present an approach to stabilizing floating-point programs against volatility. Our approach, dubbed provenance analysis, traces volatility observed in a given intermediate expression E back to volatility in preceding statements, and quantifies individual contributions to the volatility in E. Statements contributing the most are then stabilized, by disambiguating the arithmetic using expression rewriting and control pragmas. The benefit of local (as opposed to program-wide) stabilization is that compilers are free to engage performance- or precision-enhancing optimizations across program fragments that do not destabilize E. We have implemented our technique in a dynamic analysis tool that reports both volatility and provenance information. We demonstrate that local program stabilization often suffices to reduce platform dependence to an acceptable level.


Provenance Information Provenance Analysis Strict Evaluation Rational Arithmetic Affine Arithmetic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    IEEE Standards Association. IEEE standard for floating-point arithmetic (2008).
  2. 2.
    Boldo, S., Jourdan, J.-H., Leroy, X., Melquiond, G.: A formally-verified C compiler supporting floating-point arithmetic. In: 21st IEEE Symposium on Computer Arithmetic (ARITH), pp. 107–115. IEEE (2013)Google Scholar
  3. 3.
    Boldo, S., Nguyen, T.M.T.: Hardware-independent proofs of numerical programs. In: Muñoz, C. (ed.) Second NASA Formal Methods Symposium (NFM 2010), vol. NASA/CP-2010-216215, pp. 14–23. NASA, Washington D.C., April 2010Google Scholar
  4. 4.
    Burden, R.L., Faires, J.D.: Numerical analysis. Cengage Learning (2010)Google Scholar
  5. 5.
    Corden, M.J., Kreitzer, D.: Consistency of floating-point results using the Intel\(\textregistered \) compiler or why doesn’t my application always give the same answer? (2010).
  6. 6.
    Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1979, pp. 269–282. ACM, New York (1979)Google Scholar
  7. 7.
    Darulova, E., Kuncak, V.: Trustworthy numerical computation in Scala. ACM Sigplan Not. 46, 325–344 (2011). ACMCrossRefGoogle Scholar
  8. 8.
    de Dinechin, F.: Computing with floating point.
  9. 9.
    Fulgham, B., Gouy, I.: The Computer Language Benchmarks Game (2010).
  10. 10.
    Putot, S., Goubault, E., Martel, M.: Static analysis-based validation of floating-point computations. In: Alt, R., Frommer, A., Kearfott, R.B., Luther, W. (eds.) Num. Software with Result Verification. LNCS, vol. 2991, pp. 306–313. Springer, Berlin (2004). doi: 10.1007/978-3-540-24738-8_18 CrossRefGoogle Scholar
  11. 11.
    Goubault, E.: Static analyses of the precision of floating-point operations. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 234–259. Springer, Berlin (2001). doi: 10.1007/3-540-47764-0_14 CrossRefGoogle Scholar
  12. 12.
    Goubault, E., Putot, S.: Static analysis of finite precision computations. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 232–247. Springer, Berlin (2011). doi: 10.1007/978-3-642-18275-4_17 CrossRefGoogle Scholar
  13. 13.
    Granlund, T., and the GMP development team: GNU MP: The GNU Multiple Precision Arithmetic Library, 6.1.1 edn. (2016).
  14. 14.
    Gu, Y., Wahl, T., Bayati, M., Leeser, M.: Behavioral non-portability in scientific numeric computing. In: Träff, J.L., Hunold, S., Versaci, F. (eds.) Euro-Par 2015. LNCS, vol. 9233, pp. 558–569. Springer, Berlin (2015). doi: 10.1007/978-3-662-48096-0_43 CrossRefGoogle Scholar
  15. 15.
    Martel, M., Cea Recherche Technologique: Semantics of roundoff error propagation in finite precision computations. J. High. Order Symbolic Comput. 19, 7–30 (2006)Google Scholar
  16. 16.
    Meng, Q., Humphrey, A., Schmidt, J., Berzins, M.: Preliminary experiences with the Uintah framework on Intel Xeon Phi and stampede. In: Proceedings of the Conference on Extreme Science and Engineering Discovery Environment: Gateway to Discovery, p. 48. ACM (2013)Google Scholar
  17. 17.
    Mikusinski, P., Taylor, M.: An Introduction to Multivariable Analysis from Vector to Manifold. Springer Science & Business Media, New York (2012)Google Scholar
  18. 18.
    Miné, A.: The octagon abstract domain. High. Order Symbol. Comput. 19(1), 31–100 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Pozo, R., Miller, B.: SciMark 2.0, December 2002.
  20. 20.
    Stolfi, J., De Figueiredo, L.H.: An introduction to affine arithmetic. Trends Appl. Comput. Math. 4(3), 297–312 (2003)MathSciNetzbMATHGoogle Scholar
  21. 21.
    Tuyen, N.T.M., Marché, C.: Proving floating-point numerical programs by analysis of their assembly code. Research Report RR-7655, INRIA, June 2011Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.College of Computer and Information ScienceBostonUSA

Personalised recommendations