A double is a float with twice the precision.
Say a float can handle 6-7 significant digits. eg 0.123456 x 10^whatever
A double would be able to handle 15-16 significant digits. eg 0.123456789012345 x 10^whatever.
Say a float takes up 32bits, a double would take up 64 bits.
If you need 15-16 digits, like if you were doing really precise calculations and had memory to spare use a double.
If you’re short on memory and don’t really need it to be that exact use a float.
Latest Answers