How can I determine if a Cocoa NSNumber represents NaN (not a number)?
NSNumber
This emerges, for example, when I parse a string that has an invalid (non-numeric) contents.
So, I found out that the class property [NSDecimalNumber notANumber] is just for this purpose. In some languages NaN != NaN, but this isn't the case in Cocoa.
[NSDecimalNumber notANumber]
2.1m questions
2.1m answers
60 comments
57.0k users