1938
ParentOf 1108 Excessive Reliance on Global Variables 1948
Weakness Ordinalities
Indirect :
Common Consequences
Scope Impact Likelihood
Other Reduce Maintainability
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 1412 Comprehensive Categorization: Poor Coding Practices 1400 2538
CWE-1077: Floating Point Comparison with Incorrect Operator
Weakness ID : 1077
Structure : Simple
Abstraction : Variant
Description
The code performs a comparison such as an equality test between two float (floating point) values,
but it uses comparison operators that do not account for the possibility of loss of precision.
Extended Description
Numeric calculation using floating point values can generate imprecise results because
of rounding errors. As a result, two different calculations might generate numbers that are
mathematically equal, but have slightly different bit representations that do not translate to the
same mathematically-equal values. As a result, an equality test or other comparison might produce
unexpected results.
This issue can prevent the product from running reliably. If the relevant code is reachable by an
attacker, then this reliability problem might introduce a vulnerability.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 697 Incorrect Comparison 1530
Weakness Ordinalities
Indirect :
CWE Version 4.14
CWE-1078: Inappropriate Source Code Style or Formatting
CWE-1078: Inappropriate Source Code Style or Formatting