Whats the point of a double? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Whats the point of a double?

I don't really understand why anyone would need a double, what the difference between an 8 bit number vs a 4 bit number?

15th Apr 2018, 12:34 PM
S-J
S-J - avatar
3 Respuestas
+ 2
16 as an unsigned binary number is 10000, which is 5 bits. Also, double can store floating point numbers (for fractional values) but int stores whole numbers
15th Apr 2018, 1:18 PM
Dan Walker
Dan Walker - avatar
+ 1
Because some numbers need 5 or more bits to be represented
15th Apr 2018, 1:12 PM
Dan Walker
Dan Walker - avatar
0
Dan Walker Example?
15th Apr 2018, 1:16 PM
S-J
S-J - avatar