int a=1; int b=2; NSInteger a1=1; NSInteger b1=2; NSLog(@"%.2f",(float)a1/b1);//ok NSLog(@"%.2f",(float)a/b);//ok NSLog(@"%.2f",(float)(a/b));//error;