We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I have got the wrong result when I use the function printf with format of floating point number which is more than 1000000. For example: f=10000012; printf("\n\r%4.3f",f); and I have got only 10000010.000. I check the value of variable f in memory by IEEE-754 standard which is correct as 0x4B18968C (10000012). I don't know the output of printf is incorrectt. Please help understand and resolve this problem.
I think the problem here is that floats are only required to have 6 digits of precision. I guess you'll have to be grateful that you seem to be getting 7. Stefan