4 ms·
Having consistent behavior for NaN means that I can write "<math operation> ? x : y" and know that "y" will be the result when "<math operation>" involves NaN.
by mherkender 12y ago
Having consistent behavior for NaN means that I can write "<math operation> ? x : y" and know that "y" will be the result when "<math operation>" involves NaN. It's useful.
Not saying it's the perfect way to handle things, but it's pretty reasonable in world where people write code that generates NaN almost every time they use division. I worry more about writing code that generates NaNs than NaNs themselves anyway.