Description
Float is a number with a decimal point. Float data is often used to simulate continuous values because they have greater accuracy than integers. The value range of floating point numbers is 3.4028235 E+38 ~ -3.4028235 E+38. Floating point data can store 4 bytes of data.
Float has only 6-7 significant digits. This refers to the total number of digits, not the number to the right of the decimal point.
Example code
int x;
int y;
float z;x = 1;
y = x / 2; // y now contains 0, ints can’t hold fractions
z = (float)x / 2.0; // z now contains .5 (you have to use 2.0, not 2)



