What about casting both values to `(float)` then?
Using `!=` is bad practice …