mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r927] had to put the extra cast in for the __int64 to double conversion.
I included a comment everywhere that this was needed.
This commit is contained in:
parent
0336078c9f
commit
04979ec732
@ -128,7 +128,12 @@ main(void)
|
||||
the_data)<0) goto error;
|
||||
for (i=0; i<ds_size[0]; i++) {
|
||||
for (j=0; j<ds_size[1]; j++) {
|
||||
error = fabs(the_data[i][j]-(double)i/((double)j+1));
|
||||
/*
|
||||
* The extra cast in the following statement is a bug workaround
|
||||
* for the Win32 version 5.0 compiler.
|
||||
* 1998-11-06 ptl
|
||||
*/
|
||||
error = fabs(the_data[i][j]-(double)((hssize_t)(i/(j+1))));
|
||||
assert(error<0.0001);
|
||||
}
|
||||
}
|
||||
|
@ -239,9 +239,14 @@ test(fill_t fill_style, const double splits[],
|
||||
if (verbose) {
|
||||
if (H5Fflush(file, H5F_SCOPE_LOCAL)<0) goto error;
|
||||
if (fstat(fd, &sb)<0) goto error;
|
||||
/*
|
||||
* The extra cast in the following statement is a bug workaround
|
||||
* for the Win32 version 5.0 compiler.
|
||||
* 1998-11-06 ptl
|
||||
*/
|
||||
printf("%4lu %8.3f\n",
|
||||
(unsigned long)i,
|
||||
(double)(sb.st_size-i*sizeof(int))/(double)i);
|
||||
(double)((hssize_t)((sb.st_size-i*sizeof(int))/i)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,8 +277,13 @@ test(fill_t fill_style, const double splits[],
|
||||
abort();
|
||||
}
|
||||
if (fstat(fd, &sb)<0) goto error;
|
||||
/*
|
||||
* The extra cast in the following statement is a bug workaround
|
||||
* for the Win32 version 5.0 compiler.
|
||||
* 1998-11-06 ptl
|
||||
*/
|
||||
printf("%-7s %8.3f\n", sname,
|
||||
(sb.st_size-cur_size[0]*sizeof(int))/(double)cur_size[0]);
|
||||
(double)((hssize_t)((sb.st_size-cur_size[0]*sizeof(int))/cur_size[0])));
|
||||
|
||||
}
|
||||
close(fd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user