This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Floating point calculation problem

Hello,

I have this code and I noticed a strange problem:

void test(float a,float b)
{
	Uint32 c = (a/b)-1;
	if(c) asm(" ESTOP0");

	// here c = 199998 ?????
}

void main()
{
	test(200E6,1E3);
}

c is equal to 199998 instead of 199999 why ??