2 ms·
Still not a valid complaint. You want to test for NaN because some computation might result in NaN. Ergo, there is some expression in your language to produce N
by jules 12y ago
Still not a valid complaint. You want to test for NaN because some computation might result in NaN. Ergo, there is some expression in your language to produce NaN. Use that expression to define NaN.
Response to edit:
There can be several answers to this question. If you're gonna be stuck with the IEEE floats, obviously the right thing to do is an isNaN predicate, but arguably there shouldn't be more than 1 NaN in the first place.