Quote Originally Posted by Igor Vartanov View Post
I don't know what's wrong with your code, but mine works fine:
Code:
#include <stdio.h>

int main()
{
    float a = -0.1;
    printf("%f", a +0.1);
    return 0;
}
when add one time its true, but when you do it with cycle it looks something like this

a = -0.1 + 0.01000000001 and so on
and then you compare 0 with a it is looks something like this 0 != 0.0000000000001