Division by zero
Division by zero occurs
Description
This check determines whether the right operand of a division or modulus operation is zero.
Nonfinite Floats Not Allowed
By default, nonfinite floats are not allowed. A check on a division or modulus operation is:
Red, if the right operand is zero on all execution paths through the operation.
Orange, if the right operand is zero on some of the execution paths.
Green, if the right operand cannot be zero.
Nonfinite Floats Allowed
If you enable a verification mode that incorporates infinities and leave the
default that infinities must be allowed, floating point division by zero checks are
disabled. In addition, if you specify that the verification must forbid or warn
about operations that produce infinities, floating point division by zero errors are
shown as overflows. See also Overflow
.
To enable this verification mode, use these options:
Infinities (-check-infinite)
: Leave the default mode or use argumentwarn
orforbid
.
Diagnosing This Check
Examples
Check Information
Group: Numerical |
Language: C | C++ |
Acronym: ZDV |