I have following code for double comparision. Why I am getting not equal when I execute?
#include #include #include
The epsilon for 2 doubles is 2.22045e-016
2.22045e-016
By definition, epsilon is the difference between 1 and the smallest value greater than 1 that is representable for the data type.
These differ by more than that and hence, it returns false
(Reference)