In this kind of comaprisions, 99% of the time the else part of the if condition gets executed.
In this example, when you try to compare 0.7 with 0.7, what actually happens internally is, one of the 0.7 is interpreted as 0.6999999999.
Floating point representation is machine dependent.
Even though there is not much of a difference between 0.7 and 0.6999999999, the if condition fails.
So, never use floating numbers for comparision.