This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with floating point operation

Please, help me to solve the problem:
<source code>
bit Result;
float Density;

Density = 0.55;
if(( Density < 0.54999995) {
Result = 0;
}
else {
Result = 1;
}

While after running this code Result = 0 ?

0