
...
Improper conversions between integers and floating-point values may yield unexpected results, especially loss of precision. Additionally, these unexpected results may actually involve overflow, or undefined behavior.
Recommendation | Severity | Likelihood |
---|
Detectable | Repairable | Priority | Level |
---|---|---|---|
FLP06-C | Low | Probable | No |
No |
P2 |
L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Astrée |
| Supported: This rule aims to prevent truncations and overflows. All possible overflows are reported by Astrée. | |||||||
Axivion Bauhaus Suite |
|
| CertC-FLP06 | ||||||||
CodeSonar |
| LANG.TYPE.MOT | Mismatched operand types | ||||||
Compass/ROSE |
Can detect violations of this rule. Any assignment operation where the type of the assigned-to value is | |||||||||
Helix QAC |
| C4117, C4118 | |||||||
LDRA tool suite |
| 435 S | Enhanced enforcement | ||||||
Parasoft C/C++test |
| CERT_C-FLP06-a | Implicit conversions from integral to floating type which may result in a loss of information shall not be used | |||||||
PC-lint Plus |
| 653, 790, 942 | Fully supported |
Polyspace Bug Finder |
Overflow from operation between floating points
4117
4118
| Checks for float overflow (rec. partially covered) | ||||||||
PVS-Studio |
| V636 | |||||||
Splint |
|
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
[Hatton 1995] | Section 2.7.3, "Floating-Point Misbehavior" |
...
...