float a = 0.5;
float b = 0.7;
printf("%f",a);
printf("\n");
printf("%f",b);
if(a == .5)
printf("\nOK\n");
else
printf("NOTOK\n");
if(b == .7)
printf("OK");
else
printf("NOTOK");
It seems that output should be OK for both a and b but the output is OK for a but NOTOK for b. Why?