float precision, wrong computations

when I run following code:

float v = 100.0f - 99.2f;

I get v = 0,8000031 instead of 0.8.

how to increase float precision?

That is what the double type is for.

Although it will use more memory, and also it will keep on having small imprecisions, although much smaller ones. (For example, 0.800000000000000000000000000023).

Also, check this link:
link text