Difference between float and double?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Difference between float and double??

20th Feb 2017, 6:19 AM
sidhartha R
3 Answers
+ 3
Precision is the main difference. Float - 7 digits (32 bit) Double-15-16 digits (64 bit)
20th Feb 2017, 6:24 AM
Megatron
Megatron - avatar
+ 2
Floats typically use 4 bytes of data, whereas doubles use 8 bytes. That means that a float takes up less space, but it doesn't have the precision or range of a double.
20th Feb 2017, 6:24 AM
DaemonThread
DaemonThread - avatar
0
thank you guys....
20th Feb 2017, 6:31 AM
sidhartha R