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
Preview
Unable to display preview. Download preview PDF.
References
M. Abramowitz, I.A. Stegun, Handbook of Mathematical Functions, \(9\) th Printing (Dover, New York, 1972)
W.J. Cody, W. Waite, Software Manual for the Elementary Functions (Prentice Hall, Upper Saddle River, 1980)
J.W. Crenshaw, Math Toolkit for Real-Time Programming, 1st edn. (CMP Books, Lawrence, 2000)
C. Hastings, Approximations for Digital Computers (Princeton University Press, Princeton, 1955)
J. LaBrosse, Embedded Systems Building Blocks: Complete and Ready-to-Use Modules in C (CMP Books, Lawrence, 1999)
J.M. Muller, Elementary Functions: Algorithms and Implementation (Birkhäuser, Boston, 2006)
Wikipedia: Fixed-point arithmetic (2012), http://en.wikipedia.org/wiki/Fixed-point_arithmetic
Author information
Authors and Affiliations
Corresponding author
Rights 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)