@nitish kumar jha - Comparing floating point values to absolute numbers (such as 0.0) isn't a good plan.
Very technical - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
More accessable - http://www.floating-point-gui.de/errors/comparison/
Here's my C solution. Instead of dealing with floating point comparisons, I convert the characters after the decimal point to an integer and compare that to zero. This solution won't work if the decimal point is not proceeded with a valid number (such as ".0232").