i dont want to print the number with mantissa...but i want to *return* with mantissa...so i used the following code..
the problem is that in 'f' 20th to 23rd bits of manitissa are getting rounded off
For Example :
if number to be converted is 0.56
the output is f =1.00011110101110000107812e-01
-
d= 1;
-
for(i=0;i<23;i++)
-
{
-
temp=1/(pow(10,d));
-
f= f+(c[i]*temp);
-
printf("%d",c[i]);
-
d++;
-
-
}
-
-
printf("\n %.23Le \n ",f);
-
{ c[i] contains the mantissa value with 23 digits}
i hav to return a binary number...