I used this code to cut a string
NSString *titleString = @"22.225453615805794,113.554006577014889"; NSArray *array = [titleString componentsSeparatedByString:@","]; NSLog(@"title string %@", titleString); NSLog(@"first %.15f", [[array objectAtIndex:0] floatValue]); NSLog(@"second %.15f", [[array objectAtIndex:1] floatValue]);
but why does he return
+22.225454330444336 as well as +113.554008483886719
source share