Originally Posted by
wysota
First question would be - do you really need to know if a double is 64bit or 128bit long? I sincerily doubt you'll ever need a 128bit precision
I see your point, and agree in most situations. However the pitfall is reading and writing to file.
For example, suppose I have the following code:
void write_raw_data(FILE *outf,double *data, long N) {
fwrite(data, sizeof(double),N,outf);
}
void read_raw_data(FILE *inf,double *data, long N) {
fread(data, sizeof(double),N,inf);
}
void write_raw_data(FILE *outf,double *data, long N) {
fwrite(data, sizeof(double),N,outf);
}
void read_raw_data(FILE *inf,double *data, long N) {
fread(data, sizeof(double),N,inf);
}
To copy to clipboard, switch view to plain text mode
Then, you may not be able to read the file I wrote, and vice versa.
Bookmarks