raman00084
Full Member level 6
- Joined
- Nov 29, 2010
- Messages
- 375
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,298
- Activity points
- 4,076
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