+ 2
There is no need to use double. At that place we can use int or float.why it is necessary to use double.
4 odpowiedzi
+ 3
Suppose, if your number is very long after decimal
like 24.7364783393729 or say π
Or if you want to get a precise result
Then, you use double type
double x;
+ 2
We usually use double because it is more precise, it stores more digits of the number. If your running a system that precision is not so important and has thousands of variables, than you would use float to save processing.
Hope it helps, cheers!
+ 1
Double is not just “double”.
It stands for double the precision. So more precise processing is the result.