送交者: neo6 于 2005-5-25, 01:26:36:
I saved double type to file simply using fprintf (file, "%lg\n", data)
and later load it using fscanf (file, "%lg\n", &data)
these data then go through some fft stuff
I found this only save 6 or 7 digits, however, previously it works fine
but recently I got some weired results when my data is 32k, 64k, 128k
I am wondering wether the precision loss during the simple save and load caused this
do you think this could be a cause?
also what's the standard way to save and load double type to a text file? I am now change to fprintf(file, "%30.16lg\n", data) but I prefer some standard way to do that
thanks