0
When would I use double instead of float?
2 Answers
+ 2
You'll get a higher real number precision at the cost of a higher memory consumption (float variables take less space to store than doubles).
On some super rare hardware there might be a performance impact between those two but nowadays with floating point units (FPUs) there is no difference anymore besides the memory.
+ 1
when you want much more precision in your answer, like the answer you are getting with float is 4.1234567 but you want much more precise answer then you use double which will give you a answer with much more values after the point