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.

Copying float to int rounds up

Other Parts Discussed in Thread: AM3517

Hello,

we're currently having a problem with rounding float values in c. Here's an example:

float fTest = 2.678f;

int iTest = fTest;

On other systems and PC, iTest results in 2, but on our AM3517 system, iTest has a value of 3.

 It is a AM3517 system running technexion WinCE6 BSP, and a Visual Studio 2008 Windows CE application.

 

What is the reason for this?

Can some configuration be made to have the 'normal' behaviour? 

Thanks in advance for any help.

Best regards, Timm.