Main Content

Numerical Defects

Defects for numerical coding errors, division by zero, type conversion, and negative shift operations, math standard library

These defects are errors relating to variables in your code; their values, data types, and usage. The defects include:

  • Mathematical operations

  • Conversion overflow

  • Operational overflow

Polyspace Results

expand all

Bitwise operation on negative valueUndefined behavior for bitwise operations on negative values
Integer constant overflowConstant value falls outside range of integer data type
Integer conversion overflowOverflow when converting between integer types
Integer division by zeroDividing integer number by zero
Integer overflowOverflow from operation between integers
Integer precision exceeded Operation using integer size instead of precision can cause undefined behavior
Invalid use of standard library integer routineWrong arguments to standard library function
Possible invalid operation on boolean operandOperation can exceed precision of Boolean operand or result in arbitrary value
Precision loss from integer to float conversionLeast significant bits of integer lost during conversion to floating-point type
Right operand of shift operation outside allowed boundsOverflow from shifting operation
Shift of a negative valueShift operator on negative value
Sign change integer conversion overflowOverflow when converting between signed and unsigned integers
Unsigned integer conversion overflowOverflow when converting between unsigned integer types
Unsigned integer overflowOverflow from operation between unsigned integers
Unsigned integer constant overflowConstant value falls outside range of unsigned integer data type
Use of plain char type for numerical valuePlain char variable in arithmetic operation without explicit signedness
Absorption of float operandOne addition or subtraction operand is absorbed by the other operand
Float conversion overflowOverflow when converting between floating point data types
Float division by zeroDividing floating point number by zero
Float overflowOverflow from operation between floating points
Invalid use of standard library floating point routineWrong arguments to standard library function

Topics

  • Bug Finder Defect Groups

    The Bug Finder defect checkers are classified into groups such as data flow, concurrency, numerical, and so on.