3 ms·
I don't understand what your example has to do with the NaN != NaN case. You're not comparing NaN to NaN anywhere in it.
by Bratmon 1y ago
I don't understand what your example has to do with the NaN != NaN case. You're not comparing NaN to NaN anywhere in it.
- xg15 1y agoNo, sorry. That post was kind of two things rolled into one. The example was about comparing NaN with ordinary numbers, not with itself. In the example, both "num_examples <= 0" and "0 < num_examples" evaluate to false, which is mathematically correct but leaves the function in an inconsistent state.