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.

C2000 floating point issue: x/x not always 1

I'm using cgtools 5.2.10 and rts2800_fpu32_fast_supplement.lib on an f28335.

I observe that the following code

  float q, x = 0.0434;
  int   y;
  q = x/x;
  y = q;

gives q slightly less than 1 and consequently y == 0.

Now the question: Is this a bug in the division routine or is it wrong to assume that the quotient of two equal floats (aside from 0, NaN and so on) is exactly 1?

Regards,

Johannes