- 1
Difference between int, float, double?
I know this three are for numbers but still don't see the difference
2 Respuestas
0
int is a type for integer numbers (0, ±1, ±2, ...). float and double are types for floating point mathematics and can store real numbers (like 2.5, -100.100, etc). float and double differ by their size in memory and thus precision they can provide. The reason you have different types for those is that underlying mathematics for integers and floating point numbers are very different, being much more complex for the latter, up to the point when different parts of CPU do integer and floating point operations (google FPU and ALU).
0
thanks :)