J
Joon Kim
Can someone help me please ?
for example, when I read floating point from file (ascii)
0.123456789012345678901234567890
compile following program,
using
pgCC compiler with 64 bit AMD opteron processor,
....
int main()
{
FILE *fp;
double f;
char buff[100];
pf = fopen("filename", "r");
fscanf(pf, "%s", buff);
f = atof(buff);
fclose(fp);
printf("%.32f\n", f);
}
then the result is
0.1234567890123456773XXXXX <- X is different from written file.
Can I extend the precision ?
Thank you.
for example, when I read floating point from file (ascii)
0.123456789012345678901234567890
compile following program,
using
pgCC compiler with 64 bit AMD opteron processor,
....
int main()
{
FILE *fp;
double f;
char buff[100];
pf = fopen("filename", "r");
fscanf(pf, "%s", buff);
f = atof(buff);
fclose(fp);
printf("%.32f\n", f);
}
then the result is
0.1234567890123456773XXXXX <- X is different from written file.
Can I extend the precision ?
Thank you.