Error with mathematical calculation

You are correct about that, I changed that after posting.

The Arduino environment does support this type of code:

float var = 0;

But, it consumes a lot of extra memory... I am running already into the limits of the memory of the Atmega8.

Would it be really hard to use the Atmega168 on the Arduino board (not the mini)?