Description:
Avoid testing floating point numbers for equality. Floating-point numbers that should be equal are not always equal due to rounding problems.
Example:
void oper (double d) {
if ( d != 15.0 ) {
for ( double f = 0.0; f < d; f += 1.0 ) {
// do something
}
}
}