Typical float can represent exactly about 232 different numbers like 1234.0 and -0.125. 999999999
is not one of them. 10000000000.0f
is the closest float
alternative.
The approximation occurred during the assignment
float number = 999999999; // Really assigned 10000000000.0f