...
For information regarding floating-point number conversions, see FLP34-C. Ensure that floating-point conversions are within range of the new type.
...
Operating System | How to Handle Floating-Point Errors |
---|---|
Linux | Use the C floating-point exception functions. |
Windows | Use either the C floating-point exception functions or structured exception handling through |
Noncompliant Code Example
...
CERT C++ Secure Coding Standard | FLP03-CPP. Detect and handle floating point errors |
---|---|
MITRE CWE | CWE-369, Divide by zero |
Bibliography
[IEEE 754] | |
---|---|
[Intel 2001] | |
[Keil 2008] | |
[MSDN] | "fpieee_flt (CRT)" |
[Open Group 2004] | "fenv.h - Floating-point environment" |
[SecurityFocus 2007] |