What's the difference between these data types; float and double. | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

What's the difference between these data types; float and double.

29th Nov 2016, 10:20 PM
_n3m9
_n3m9 - avatar
2 Respuestas
+ 5
As the name implies, a double has 2x the precision of float. The float data type is a single precision 32 bits. The double data type is a double-precision 64-bit.
29th Nov 2016, 11:01 PM
Vladimir Honcharenko
Vladimir Honcharenko - avatar
+ 4
A double is 64 and single precision (float) is 32 bits. The double has a bigger mantissa (the integer bits of the real number). Any inaccuracies will be smaller in the double.
29th Nov 2016, 11:00 PM
Saeed
Saeed - avatar