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]
1.4m articles
1.4m replys
5 comments
57.0k users