NSLog
(
@"%f"
,
round
(
12345.6789
));
//12346.000000
NSLog ( @"%f" , round ( 12345.6749 * 100 )/ 100 ); //12345.670000
NSNumber *num = [ NSNumber numberWithFloat : 12.1250 ];
NSLog ( @"%@" ,[ NSString stringWithFormat : @"%.2f" , round ([num floatValue ]* 100 )/ 100 ]); //12.13
NSLog ( @"%f" , round ( 12345.6749 * 100 )/ 100 ); //12345.670000
NSNumber *num = [ NSNumber numberWithFloat : 12.1250 ];
NSLog ( @"%@" ,[ NSString stringWithFormat : @"%.2f" , round ([num floatValue ]* 100 )/ 100 ]); //12.13