News for hackers. Stuff that matters.
Re:NaN does not mean "I am not a number” by fpaboim on Friday July 11, 2014 @12:03AM (#8018821)
This discussion is ridiculous. NaN should obviously return true of isNumber, and probably just indicates you did something funky with your numbers and they exploded. They're still numbers, you're the one who's at fault (I never really saw NaN come by on purpose...). It's just that computers can't really represent some numbers and when that happens you get NaN and as much as you want languages to read as english or be perfect abstractions sometimes practical implementations details end up surfacing and theres nothing you can do.
Re:NaN does not mean "I am not a number” by xupybd on Friday July 11, 2014 @07:31AM (#8019613)
But there is something we can do. We can make the context clear and resolve this.
Re:NaN does not mean "I am not a number” by wlievens on Friday July 11, 2014 @03:37AM (#8019193)
> I never really saw NaN come by on purpose

We use NaN for masking in image processing, for instance for filtering out defective pixels. If a pixel has value NaN, it is ignored across the board.

Re:NaN does not mean "I am not a number” by twiceaday on Friday July 11, 2014 @02:10AM (#8019057)
1%0 is not found on the number line. It's not a number.