Possible Duplicate:
Most effective way for float and double comparison
In my program some double variables take values of the form 1.00000001
. Equality check of these variables with 1
obviously fails.
I wanted to know how can I reduce the precision of double type variables in c, so that equality with integers works.