You don’t see anything because the condition results to false. Your variable a is float, while 1.0/k in if clause is double. They have different precision and therefore are not equal. In general it is a bad idea to compare floats on equality.
You don’t see anything because the condition results to false. Your variable a is float, while 1.0/k in if clause is double. They have different precision and therefore are not equal. In general it is a bad idea to compare floats on equality.