raman00084
Full Member level 6
fstr="100.12";
fvalue = atof(fstr);
lcd_gotoxy(1, 2);
printf(lcd_putc, "fstr: %s", fstr); the value pinted is 100.12
lcd_gotoxy(1, 3);
printf(lcd_putc, "fvalue: %f", fvalue); the value printed is 100.11
0.01 is minis ed if i use atof function this is constant for all values i checked for 10 different values the result is same 0.01 is getting reduced
kindly help
kalyan
fvalue = atof(fstr);
lcd_gotoxy(1, 2);
printf(lcd_putc, "fstr: %s", fstr); the value pinted is 100.12
lcd_gotoxy(1, 3);
printf(lcd_putc, "fvalue: %f", fvalue); the value printed is 100.11
0.01 is minis ed if i use atof function this is constant for all values i checked for 10 different values the result is same 0.01 is getting reduced
kindly help
kalyan