...
Conversion from integral types to floating-point types without sufficient precision can lead to loss of precision (loss of least significant bits).
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
FLP36-C | Low | Unlikely | Medium | P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||
|---|---|---|---|---|---|---|---|
| Astrée |
|
| Supported, but no explicit checker | |||||||||
| Coverity |
| MISRA C 2004 Rule 10.x (needs investigation) | Needs investigation | ||||||
| LDRA tool suite |
| 435 S | Fully implemented | ||||||
| Parasoft C/C++test |
|
|
| MISRA-043_ |
| c, MISRA-043_d |
| Implemented | ||||||||
| PRQA QA-C++ |
| 3011 |
| PRQA QA-C | 9.1 | 3804, 4453, 4454 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
Key here (explains table format and definitions)
Taxonomy | Taxonomy item | Relationship |
|---|---|---|
| CERT C Secure Coding Standard | DCL03-C. Use a static assertion to test the value of a constant expression | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT Oracle Secure Coding Standard for Java | NUM13-J. Avoid loss of precision when converting primitive integers to floating-point | Prior to 2018-01-12: CERT: Unspecified Relationship |
Bibliography
| [ISO/IEC 9899:2011] | Subclause 6.3.1.4, "Real Floating and Integer" |
...
...