Advertisement

Languages and Compilers

  • Jean-Michel Muller
  • Nicolas Brunie
  • Florent de Dinechin
  • Claude-Pierre Jeannerod
  • Mioara Joldes
  • Vincent Lefèvre
  • Guillaume Melquiond
  • Nathalie Revol
  • Serge Torres
Chapter

Abstract

The previous chapters have given an overview of interesting properties and algorithms that can be built on an IEEE 754-compliant floating-point arithmetic. In this chapter, we discuss the practical issues encountered when trying to implement such algorithms in actual computers using actual programming languages. In particular, we discuss the relationship between standard compliance, portability, accuracy, and performance. This chapter is useful to programmers wishing to obtain a standard-compliant behavior from their programs, but it is also useful for understanding how performance may be improved by relaxing standard compliance and also what traps one may fall into.

References

  1. [11]
    B. Amedro, V. Bodnartchouck, D. Caromel, C. Delbé, F. Huet, and G. L. Taboada. Current state of Java for HP. Preprint, Technical Report 0353, INRIA, 2008. Available at http://hal.inria.fr/inria-00312039/en.
  2. [17]
    ARM. ARM Developer Suite: Compilers and Libraries Guide. ARM Limited, November 2001. Available at http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0067d/index.html or in PDF at http://infocenter.arm.com/help/topic/com.arm.doc.dui0067d/DUI0067.pdf.
  3. [18]
    ARM. ARM Developer Suite: Developer Guide. ARM Limited, 1.2 edition, November 2001. Available at http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0056d/index.html or in PDF at http://infocenter.arm.com/help/topic/com.arm.doc.dui0056d/DUI0056.pdf.
  4. [19]
  5. [51]
    S. Boldo, J.-H. Jourdan, X. Leroy, and G. Melquiond. Verified compilation of floating-point computations. Journal of Automated Reasoning, 54(2):135–163, 2015.MathSciNetCrossRefGoogle Scholar
  6. [152]
    F. de Dinechin, E. McIntosh, and F. Schmidt. Massive tracking on heterogeneous platforms. In 9th International Computational Accelerator Physics Conference (ICAP), October 2006.Google Scholar
  7. [214]
    D. Goldberg. What every computer scientist should know about floating-point arithmetic. ACM Computing Surveys, 23(1):5–48, 1991. An edited reprint is available at https://docs.oracle.com/cd/E19059-01/fortec6u2/806-7996/806-7996.pdf from Sun’s Numerical Computation Guide; it contains an addendum Differences Among IEEE 754 Implementations, also available at http://www.validlab.com/goldberg/addendum.html.CrossRefGoogle Scholar
  8. [220]
    J. Gosling, B. Joy, G. Steele, G. Bracha, and A. Buckley. The Java Language Specification, Java SE 8 edition. Oracle, 2015.Google Scholar
  9. [273]
    International Organization for Standardization. Programming Languages – C. ISO/IEC Standard 9899:1999, Geneva, Switzerland, December 1999.Google Scholar
  10. [275]
    Rationale for International Standard—Programming Languages—C, 2003. Revision 5.10. Available at http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf.
  11. [276]
    International Organization for Standardization. Programming languages – Fortran – Part 1: Base language. International Standard ISO/IEC 1539-1:2004, 2004.Google Scholar
  12. [278]
    International Organization for Standardization. Programming Languages – C. ISO/IEC Standard 9899:2011, Geneva, Switzerland, November 2011.Google Scholar
  13. [279]
    International Organization for Standardization. Floating-point extensions for C – Part 1: Binary floating-point arithmetic. ISO/IEC Technical Specification 18661-1:2014, Geneva, Switzerland, July 2014.Google Scholar
  14. [280]
    International Organization for Standardization. Floating-point extensions for C – Part 2: Decimal floating-point arithmetic. ISO/IEC Technical Specification 18661-2:2015, Geneva, Switzerland, May 2015.Google Scholar
  15. [281]
    International Organization for Standardization. Floating-point extensions for C – Part 3: Interchange and extended types. ISO/IEC Technical Specification 18661-3:2015, Geneva, Switzerland, October 2015.Google Scholar
  16. [282]
    International Organization for Standardization. Floating-point extensions for C – Part 4: Supplementary functions. ISO/IEC Technical Specification 18661-4:2015, Geneva, Switzerland, October 2015.Google Scholar
  17. [283]
    International Organization for Standardization. Floating-point extensions for C – Part 5: Supplementary attributes. ISO/IEC Technical Specification 18661-5:2016, Geneva, Switzerland, August 2016.Google Scholar
  18. [322]
    W. Kahan and J. Darcy. How Java’s floating-point hurts everyone everywhere. Available at http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf, 1998.
  19. [333]
    B. W. Kernighan and D. M. Ritchie. The C Programming Language. Prentice-Hall, Englewood Cliffs, NJ, 1978.zbMATHGoogle Scholar
  20. [377]
    V. Lefèvre. The Euclidean division implemented with a floating-point division and a floor. Research report RR-5604, INRIA, June 2005.Google Scholar
  21. [383]
    X. Leroy. Formal verification of a realistic compiler. Communications of the ACM, 52(7):107–115, 2009.CrossRefGoogle Scholar
  22. [390]
    T. Lindholm, F. Yellin, G. Bracha, and A. Buckley. The Java TM Virtual Machine Specification, Java SE 8 edition. Oracle, 2015.Google Scholar
  23. [423]
    D. Monniaux. The pitfalls of verifying floating-point computations. ACM TOPLAS, 30(3):1–41, 2008. A preliminary version is available at http://hal.archives-ouvertes.fr/hal-00128124.
  24. [434]
    S. Muchnik. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997.Google Scholar
  25. [578]
    Sun. Numerical Computation Guide – Sun TM Studio 11, 2005. Available at http://docs.sun.com/source/819-3693/.

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Jean-Michel Muller
    • 1
  • Nicolas Brunie
    • 2
  • Florent de Dinechin
    • 3
  • Claude-Pierre Jeannerod
    • 4
  • Mioara Joldes
    • 5
  • Vincent Lefèvre
    • 4
  • Guillaume Melquiond
    • 6
  • Nathalie Revol
    • 4
  • Serge Torres
    • 7
  1. 1.CNRS - LIPLyonFrance
  2. 2.KalrayGrenobleFrance
  3. 3.INSA-Lyon - CITIVilleurbanneFrance
  4. 4.Inria - LIPLyonFrance
  5. 5.CNRS - LAASToulouseFrance
  6. 6.Inria - LRIOrsayFrance
  7. 7.ENS-Lyon - LIPLyonFrance

Personalised recommendations