Versions Compared

Key

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

...

When precise computation is necessary, carefully and methodically estimate the maximum cumulative error of the computations, regardless of whether decimal or binary is used, to ensure that the resulting error is within tolerances. Consider using numerical analysis to properly understand the problem. An introduction can be found in David Goldberg's "What Every Computer Scientist Should Know about Floating-Point Arithmetic" [Goldberg 1991].

Noncompliant Code Example

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

FLP02-C

lowLow

probableProbable

highHigh

P2

L3

Automated Detection

Tool

Version

Checker

Description

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

...