Hi,
I am facing issue in floating point operation in TM4C1294. when i am incrementing float value from 0.6 to 0.7 by 0.1 then variable in watch window shows 0.699999.. which is actually causing problem . I am attaching screenshot for such issue. Part of code is below
if(UP_KEY==0 )
{
if(UP_KEY==0 )
{
count++;
}
else
{
count=0;
}
if(count>10 )
{
count=15;
Set_point[channel_no]+=1.0;
}
else
{
Set_point[channel_no]+=0.1;
}
if(Set_point[channel_no]>300.0)//3.3//300.0
{
Set_point[channel_no]=0.0;
}
}

check value of Set_point[0] in watch window and is 2.20000005, after incrementing value by 0.1 the value has to be 2.30000 but it is 2.29999995 as shown in below image

Please help to correct this.
Regards
Khodidas


