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

C51 - Compiler Problem?

#include <REGX52.h>

unsigned char i;
float x;

void main()
{
x=0;
for(i=1;i<=30;i++)
{x+=1.3;}
}

This should ideally produce an output of x=39.

But in debugger the value is shown as x=38.999999. What could be the issue?

Parents Reply Children
No data