AnsweredAssumed Answered

Weird results using floating point

Question asked by Asif Iqbal on Dec 17, 2008
Latest reply on Dec 19, 2008 by Asif Iqbal
Dear All
I am trying to run a couple of floating point operations and simply cannot get it working. Here is the simplest code:

float temp;
temp = 23/3.5;

After this instruction, the value of temp is 18724.582131

I am using CW 5.0.14.8093 for an HCS12NE64 microcontroller. I am using ansilf.lib.

Would anyone help me?

Thanks
-Deneb

Outcomes