Please post your complete sketch as it is now
If you are comparing 2 float values to determine whether whether the latest one differs from the previous one then it is very likely that they will differ every time unless you take steps to compare their significant decimal places rather than the complete value down to several decimal places
As previously suggested (post #4) you would almost certainly be better off dealing with integer values and displaying them as a float (or an apparent float) only when required