This content is not included in
your SAE MOBILUS subscription, or you are not logged in.
Safe Handling of Floating Point Math in C Code Embedded Applications
Technical Paper
2017-01-1619
ISSN: 0148-7191, e-ISSN: 2688-3627
This content contains downloadable datasets
Annotation ability available
Sector:
Language:
English
Abstract
The introduction of floating point math in Embedded Application ECU’s has made the implementation of complex math functions less error prone but not error proof. This paper shall focus on raising awareness of the pitfalls that come from the use of the basic floating point arithmetic operations, that is, Divide, Multiply, Add and Subtract. Due to the known pitfalls inherent in these basic math operations, it is proposed that a standard library with common functions appropriate for Powertrain Embedded applications (but not limited to Powertrain) be identified. This paper shall explore what these common functions will look like for both standard C code as well as the equivalent versions in Matlab™ Simulink™. The particular pitfalls this paper shall discuss are Divide-By-Zero, Overflow, Underflow and Loss-Of-Precision for both single and double precision floating point variables. This paper shall reference the IEEE-754 Floating Point standard used by most Embedded C applications. This paper shall discuss the importance of recognizing these pitfalls as well as understanding the trade-offs in terms of processor resources.
Recommended Content
Authors
Citation
Loucks, C., "Safe Handling of Floating Point Math in C Code Embedded Applications," SAE Technical Paper 2017-01-1619, 2017, https://doi.org/10.4271/2017-01-1619.Data Sets - Support Documents
Title | Description | Download |
---|---|---|
Unnamed Dataset 1 | ||
Unnamed Dataset 2 | ||
Unnamed Dataset 3 | ||
Unnamed Dataset 4 | ||
Unnamed Dataset 5 | ||
Unnamed Dataset 6 | ||
Unnamed Dataset 7 | ||
Unnamed Dataset 8 | ||
Unnamed Dataset 9 |
Also In
References
- IEEE Standard for Floating-Point Arithmetic IEEE Std 754™- 2008 29 August 2008
- NXP/Freescale MPC565 Reference Manual, MPC565RM, Rev 2.2 11 2005
- NXP/Freescale e200z760n3 Power Architecture® Core Reference Manual, e200z760RM, Rev.2 06 2012
- RX Family RXv2 Instruction Set Architecture User’s Manual: Software, Renesas Electronics, Rev. 1.00 Nov 2013
- TriCore™, V1.6, Core Architecture 32-bit Unified Processor Core, User Manual 1 2012 05
- Wikipedia.org , English version, C mathematical functions