Skip to main content

Floating-Point Mathematics

  • Chapter
  • First Online:
Real-Time C++
  • 2765 Accesses

Abstract

This chapter describes floating-point mathematics for real-time C++ using built-in floating-point types such as float double and long double. The first sections of this chapter introduce floating-point arithmetic, mathematical constants, elementary transcendental functions and higher transcendental functions. The last sections of this chapter cover more advanced topics including complex-numbered mathematics, compile-time evaluation of floating-point functions and generic numeric programming.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 84.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Abramowitz, I.A. Stegun, Handbook of Mathematical Functions, 9th Printing (Dover, New York, 1972)

    MATH  Google Scholar 

  2. B. Dawes, D. Abrahams, Boost C++ Libraries (2017). http://www.boost.org

  3. A. Erdélyi, W. Magnus, F. Oberhettinger, F.G. Tricomi, Higher Transcendental Functions, vol. 1–3 (Krieger, New York, 1981)

    MATH  Google Scholar 

  4. S.R. Finch, Mathematical Constants (Cambridge University Press, Cambridge, 2003)

    MATH  Google Scholar 

  5. A. Gil, J. Segura, N.M. Temme, Numerical Methods for Special Functions (Society for Industrial and Applied Mathematics, Philadelphia, 2007)

    Book  Google Scholar 

  6. C. Hastings, Approximations for Digital Computers (Princeton University Press, Princeton, 1955)

    Book  Google Scholar 

  7. IEEE Computer Society, IEEE Std 1003.1 – 2008. IEEE Standard 754–2008 (2008). http://ieeexplore.ieee.org/servlet/opac?punumber=4610933

  8. ISO/IEC, ISO/IEC 9899:1999 : Programming Languages – C (International Organization for Standardization, Geneva, 1999)

    Google Scholar 

  9. ISO/IEC, ISO/IEC TR 19768:2007 : Information Technology – Programming Languages – Technical Report on C++ Library Extensions (International Organization for Standardization, Geneva, 2007)

    Google Scholar 

  10. ISO/IEC, ISO/IEC 29124:2010 : Information Technology – Programming Languages, Their Environments and System Software Interfaces – Extensions to the C++ Library to Support Mathematical Special Functions (International Organization for Standardization, Geneva, 2010)

    Google Scholar 

  11. ISO/IEC, ISO/IEC 14882:2011 : Information Technology – Programming Languages – C++ (International Organization for Standardization, Geneva, 2011)

    Google Scholar 

  12. ISO/IEC, ISO/IEC 14882:2017 : Programming Languages – C++ (International Organization for Standardization, Geneva, 2017)

    Google Scholar 

  13. D.E. Knuth, The Art of Computer Programming Volumes 1–3, Third Edition (Addison-Wesley, Boston, 1998)

    Google Scholar 

  14. J. Maddock, C. Kormanyos, Boost Multiprecision (2019). http://www.boost.org/doc/libs/1_70_0/libs/multiprecision/doc/html/index.html

  15. J.M. Muller, Elementary Functions: Algorithms and Implementation, Third Edition (Springer (Birkhäuser), New York, 2016)

    Book  Google Scholar 

  16. J.M. Muller, N. Brisebarre, F. de Dinechin, C.M. Jeannerod, V. Lefèvre, G. Melquiond, N. Revol, D. Stehlé, T. Torres, Handbook of Floating-Point Arithmetic (Birkhäuser, Boston, 2010)

    Book  Google Scholar 

  17. F.W.J. Olver, D.W. Lozier, R.F. Boisvert, C.W. Clark (eds.), NIST Handbook of Mathematical Functions (Cambridge University Press, Cambridge, 2010)

    MATH  Google Scholar 

  18. F.W.J. Olver, D.W. Lozier, R.F. Boisvert, C.W. Clark (eds.), F.W.J. Olver, L.C. Maximon, NIST Handbook of Mathematical Functions, Chap. 10, Bessel Functions (Cambridge University Press, Cambridge, 2010)

    Google Scholar 

  19. F.W.J. Olver, D.W. Lozier, R.F. Boisvert, C.W. Clark (eds.), R.A. Askey, A.B. Olde Daalhuis, NIST Handbook of Mathematical Functions, Chap. 16, Generalized Hypergeometric Functions and Meijer G–Function (Cambridge University Press, Cambridge, 2010)

    Google Scholar 

  20. A.A. Stepanov, D.E. Rose, From Mathematics to Generic Programming (Addison-Wesley, Boston, 2014)

    Google Scholar 

  21. Wikipedia, Riemann zeta function (2017). http://en.wikipedia.org/wiki/Riemann_zeta_function

  22. Wikipedia, Elliptic integral (2017). http://en.wikipedia.org/wiki/Elliptic_integral

  23. S. Zhang, J. Jin, Computation of Special Functions (Wiley, New York, 1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer-Verlag GmbH Germany, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Kormanyos, C. (2021). Floating-Point Mathematics. In: Real-Time C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-62996-3_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-62996-3_12

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-62995-6

  • Online ISBN: 978-3-662-62996-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics