NSNumber stringValue different from NSNumber value
I'm having problems with converting NSNumber to string and string to NSNumber . Here's a sample problem: NSString *stringValue = @"9.2"; NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; NSLog(@"stringvalue:%@",[[formatter numberFromString: stringValue] stringValue]); Output will be: stringvalue:9.199999999999999 I need to retrieve the original value, where, in the example should be 9.2 . On the contrary, when the original string is 9.4 the output is still 9.4 . Do you have any idea how to retrieve the original string value without NSNumber doing anything about it? You are