I have been tinkering with NSNumber for a little while when searching for infinity value and I have come across one interesting fact. When I do this:
long infinity = [((NSNumber *)kCFNumberPositiveInfinity) longValue];
32bit simulator interprets it as 0, while 64bit simulator interprets it as -9223372036854775808.
Now I remember my Computer Architecture 101 and they used to tell us - 32bit = smaller range, 64bit = wider range. But obviously, on 64bit simulator's interpretation of positive infinity there is an overflow(since my research tells me that positive infinity will most likely be a positive number).
The question is - is this a feature(if so, then why?), or a bug?