Yes, cast it to int before comparison. When you have an int and a float in a C expression and no cast operator, the int is converted to float, not the float to int. - The Diag numbers look like a status flag, but I don't know exactly what they mean.