Who says you can't use == to compare two floats? == works great for floats; it will return true if they are equal and false if they are different. (There are some weird things about NaN and negative zeros, but that doesn't apply to range checking).
Obviously, if you are looking for a value that is not equal, using == for any value on the multimap, it will not be found. And if you add two values that are as close to each other as possible, they will both be added.
source share