What is the difference between a float and a double float? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between a float and a double float?

12th Nov 2022, 8:58 AM
sn3p
sn3p - avatar
1 Answer
+ 2
John Muinde a double-precision float is stored in double the memory size as a single-precision float. For instance, if a float is stored in 32 bits (4 bytes), then a double is stored in 64 bits (8 bytes). That gives a double much greater numeric range or greater precision than a float. The drawbacks are that a double uses twice the memory and may be much slower.
12th Nov 2022, 10:17 AM
Brian
Brian - avatar