3 ms·
Or, maybe your "equals" function, when given two floats (floats are typically considered not-comparable in most languages), happens to return true in a particul
by _bxg1 8y ago
Or, maybe your "equals" function, when given two floats (floats are typically considered not-comparable in most languages), happens to return true in a particular case, then later on through code changes, it ends up returning false for the same two numbers. Since <float> == <float> is undefined, neither behavior is "incorrect", but it might be worthwhile to at least keep the behavior consistent.