if we set float and double type to NaN then they are not equal to anything including themselves. can such a thing happens for
Would depend on the compiler optimization maybe; look at the disassembly. If it uses binary 'and' it & check the flags after it will fail if a is zero.