Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Using a representation other than floating point may allow for more accurate results.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

FLP02-C

Low

Probable

High

P2

L3

Automated Detection

Checks for floating

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
float-comparisonPartially checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-FLP02
Compass/ROSE

 

 



Can detect violations of this recommendation. In particular, it checks to see if the arguments to an equality operator are of a floating-point type

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C0790
LDRA tool suite
Include Page
LDRA_V
LDRA_V
56 SPartially implemented
Parasoft C/C++test
9.5MISRA2004-13_3 PRQA QA-C Include PagePRQA QA-C_vPRQA QA-C_v0790 
Include Page
Parasoft_V
Parasoft_V

CERT_C-FLP02-a

Floating-point expressions shall not be tested for equality or inequality
PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

777, 9252

Partially supported

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rec. FLP02-C

Checks for floating point comparison with equality operators (rec. partially covered)

PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V550
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
float-comparisonPartially checked

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this recommendation on the CERT website.

Related Guidelines

Bibliography

...


...