Versions Compared

Key

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

...

This rule appears in the C++ Secure Coding Standard as FLP33-CPP. Convert integers to floating point for floating point operations.

This rule appears in the Java Secure Coding Standard as FLP31-J. Convert integers to floating point for floating point operations.

References

Wiki Markup
\[[Hatton 95|AA. C References#Hatton 95]\] Section 2.7.3, "Floating-point misbehavior"
\[[ISO/IEC 9899:1999|AA. C References#ISO/IEC 9899-1999]\] Section 5.2.4.2.2, "Characteristics of floating types <{{float.h}}>"
\[[MITRE 07|AA. C References#MITRE 07]\] [CWE ID 681|http://cwe.mitre.org/data/definitions/681.html], "Incorrect Conversion between Numeric Types," and [CWE ID 682|http://cwe.mitre.org/data/definitions/682.html], "Incorrect Calculation"

...