Skip to main content

Fixed-Point Mathematics

  • Chapter
  • First Online:
Book cover Real-Time C++
  • 3234 Accesses

Abstract

Many embedded systems applications need to perform floating-point calculations. As mentioned in the previous chapter, however, small-scale microcontrollers may not have hardware support for floating-point calculations with a floating-point unit (FPU). To avoid potentially slow floating-point emulation libraries manipulating 32-bit single-precision

or even 64-bit double-precision

many developers elect to use integer-based fixed-point arithmetic. The first part of this chapter describes fixed-point data types and presents a scalable template class representation for fixed-point. In the second part of this chapter, we will use our fixed-point class to compute some elementary transcendental functions, discuss fixed-point efficiency and develop a specialization of

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

Access this chapter

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, \(9\) th Printing (Dover, New York, 1972)

    Google Scholar 

  2. W.J. Cody, W. Waite, Software Manual for the Elementary Functions (Prentice Hall, Upper Saddle River, 1980)

    Google Scholar 

  3. J.W. Crenshaw, Math Toolkit for Real-Time Programming, 1st edn. (CMP Books, Lawrence, 2000)

    Google Scholar 

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

    Google Scholar 

  5. J. LaBrosse, Embedded Systems Building Blocks: Complete and Ready-to-Use Modules in C (CMP Books, Lawrence, 1999)

    Google Scholar 

  6. J.M. Muller, Elementary Functions: Algorithms and Implementation (Birkhäuser, Boston, 2006)

    Google Scholar 

  7. Wikipedia: Fixed-point arithmetic (2012), http://en.wikipedia.org/wiki/Fixed-point_arithmetic

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christopher Kormanyos .

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Kormanyos, C. (2015). Fixed-Point Mathematics. In: Real-Time C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-47810-3_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-47810-3_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-47809-7

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics