嗨,我在我的应用程序中使用PIC32 MX250F256H控制器。我面临着浮点运算的一些问题。浮点F=0in主体(){f=(浮点)(47.171143947.0);}我应该得到f=0.1711439,而我得到f= 0.1711425i,希望在十进制之后达到第六位的精度。我怎么做?
以上来自于百度翻译
以下为原文
Hi,
I am using PIC32MX250F256H controller in my applica
tion.I am facing some issues with floating point operations.
float f=0
int main()
{
f=(float)(47.1711439-47.0);
}
I should get f=0.1711439 instead I m getting f=0.1711425
I want accuracy upto 6th place after decimal.How do i do it?