AnsweredAssumed Answered

two float Variable compare,I get a wrong result

Question asked by yst on May 29, 2015
Latest reply on Jun 18, 2015 by SachinV

the code:

unsigned int b=0xffffffff;

float *pb;

bool bResult;

 

pb = (float*)&b;

if( *pb<0.0 || *pb>1000.0 )

     bResult = true;

else

     bResult = false;

 

when I debug ,bResult =false;

 

Compiling environment:BF609 cces1.1.0.0

how can I do?

Outcomes