Evgeni Kosakovski

Float use in CW 10.2

Discussion created by Evgeni Kosakovski on Apr 4, 2013
Latest reply on Apr 14, 2013 by Evgeni Kosakovski

Hi.

I work with K60/K61 MCUs. At this time I added to project float type variables for calculation. But don't all operations are work perfect.

For example:

1)

float Signal = GetValue();     // Signal = 0.6

if(Signal >= 0.5) // this compare not occured never

{

     Signal += 0.1;

}

2)

float Signal = GetValue();     // Signal = 0.6

float Compare = 0.5;

if(Signal >= Compare) // this compare not occured never

{

     Signal += 0.1;

}

In Project Properties->C/C++ Build/Settings// ARM CPU->Floating point selected "Software (default)".

What is a problem with float operations in CW 10.2 with Kinetis?

 

Thanks.

Evgeni.

 

Outcomes