It is said in many places that comparing two floating numbers for equality can give wrong result and we have to take into account some epsilon value like this
float f1,f2;
if (f1-f2<epsilon) printf("gotcha");
So what is the reasonable estimate of epsilon? My intuition is that that has to be decided on application requirement. Or we can use epsilon as like 0.0001 and be happy about it.
There is some interesting case where the integer operation is replaced by the floating point operations. Like how many digits are there in the factorial of a very big number like 1000000. Now instead of calculating the real factorial and taking log we can express it as a summation of logarithm of the numbers from 1 ... n. Then this bothers me how to adjust for values of the final result. Because a integer operation (calculating the factorial first and then taking the log) is replaced by floating point operation (addition of individual floating point numbers).
For application where two values can be different but very close like the readings taken from pressure gauge, thermometers and other analog devices, are we supposed to represent the numbers in string instead? I think someone said for business application it is recommended to represent money in string instead of double. I need to verify all these information.