My processor is BF518. Recently, I need to process some floating-point data in the BF518. I want to process some data to get the same result in the PC and the BF518. Like this example.
#include"stdio.h"
#include"float.h"
int main( void )
{
float y,x=0.6;
int u=4;
int i;
for(i=0;i<100;i++)
{
y=u*x*(1-x);
x=y;
}
printf("x = %f\n",x);
}
My PC is win7-32bits. When I run this process in the PC, I get the result is 0.172498. But I get the result is 0.288682 in the BF518. How can I slove this problem.
I know the Blackfin is fixed-point processor.