Can someone please acknowledge and explain why this is happening:
In the simulator (7.1, 32-bit):
NSNumber *a = [NSNumber numberWithFloat:0.5];
NSNumber *b = [NSNumber numberWithFloat:1.0];
NSNumber *c = [NSNumber numberWithFloat:2.0];
On the device (7.1, 32-bit):
NSNumber *a = [NSNumber numberWithFloat:0.5];
NSNumber *b = [NSNumber numberWithFloat:1.0];
NSNumber *c = [NSNumber numberWithFloat:2.0];
I thought it might be a problem with the 32-bit version, but when I try to do the same on a 64-bit simulator and device, I get an EXACT problem. The simulator is in order, the device has the same hashes.
I tried to add unique objects to NSMutableOrderedSetand noticed that both of my objects, which were identical, except for different values of 0.5 and 1.0, were not added by both, and that is why. I tried both floats and doubles with the same result.
But why?
jowie source
share