Skip to main content
705249212
Visitor II
Feb 28, 2014 11:07 AM UTC
Question

Float data doesn't make sense

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

    luca239955_stm1_st
    Associate
    Mar 2, 2014 4:18 PM UTC
    Posted on March 02, 2014 at 17:18

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