And you cannot really compare floating numbers with equality either...
In general it's a bad idea, yes. But in this case, where you're checking for a sentinel value that's guaranteed to not have been altered by any floating-point operations, it's perfectly fine.
Here both instances of the
-100000 literal are converted to floats by the same compiler in close proximity; they must be bitwise equivalent (otherwise I'd file a compiler bug report).
With that being said, I wouldn't trust comparisons between a literal value and i.e. a float converted from user input via some conversion function, since the conversion method isn't guaranteed to be the same.