Q:

ios performing calculations with large numbers

I am just multiplying two very big value in ios.
            value 1 999999999999
            value 2 99999

I am using the data type as double long i.e long long and this works for only too big values but not for small values like 10*23 something like that i get different answers example
           10.0*111.5 actual value in calculator is 1115 but i wat i get is 1110

please help me and i also want to roundof my answer to  3places like %.3f            

A:

This is probably what you are doing 
long long left = 111.5; //Not good!  Will truncate to 111
long long right = 10.0; //10
long long result = left * right; //111 * 10 = 1110

This is what you should do
double left = 111.5;
double right = 10.0;
double result = left * right; //111.5 * 10.0 = 1115.0

If for some reason double is not enough you can go for long double.  

