Description:
A floating-point operation may produce either a floating-point infinity or a Not-a-Number (NaN) value. All operations with variables whose value is NaN, produce NaN. Result of almost all operations with infinity is infinity. Only if infinity is the second operand in division operation will the result will be 0.0. FIN detects all situations which produce a result as infinity or NaN.
Example:
static void f(double x, double y){
if (x >= 0 && y >= 0) {
if (x <= 0 && y <= 0) {
//x and y always zero
double z = x/y; //NaN is produced
double zz = 1.0/x; //positive infinity is produced
zz++; //positive infinity is produced
z = 1.0/zz; //it's zero - warrning message
//is not generated
}
}
}