Skip to main content
Visitor II
February 28, 2014
Question

Float data doesn't make sense

  • February 28, 2014
  • 1 reply
  • 776 views
Posted on February 28, 2014 at 12:07

I

set a floating-point (*data) , (*data) = (*data)/(pow(10,Strlen-3-DotPos)),(*data)=1234,pow(10,Strlen-3-DotPos)=100, the result was 12.33999 how did that happen? And I want to get an a

precise result 12.34.  How to do? Right now I am doing my project by your MCU and I am eager to know the answer! Thank you !!0690X00000602jWQAQ.jpg0690X00000602jbQAA.jpg0690X00000602jlQAA.jpg

    This topic has been closed for replies.

    1 reply

    Visitor II
    March 2, 2014
    Posted on March 02, 2014 at 17:18

    floating point data are approximate representations: look it up on the internet to get the basics.