diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-04-04 21:54:48 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-04-04 21:54:48 (GMT) |
commit | 12f01d9cd48c8c49b2ad2e5e0d0a0f35e2e598a8 (patch) | |
tree | 0fc3e770c28b5b58ad8bbefb9bdb614d2d0ea5c7 /tools | |
parent | cfa54ffdc131709cce9d92580a3e3c1fb417cac4 (diff) | |
download | hdf5-12f01d9cd48c8c49b2ad2e5e0d0a0f35e2e598a8.zip hdf5-12f01d9cd48c8c49b2ad2e5e0d0a0f35e2e598a8.tar.gz hdf5-12f01d9cd48c8c49b2ad2e5e0d0a0f35e2e598a8.tar.bz2 |
[svn-r12199] Purpose:
bug fix
Description:
the percent error calculation in h5diff using double precision floating point were causing different results
on the release and debug versions of Visual Studio version 6, due to a compiler bug
Solution:
used single precision (float)
Platforms tested:
windows
linux
solaris
AIX
Misc. update:
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5diff/h5diff_common.c | 4 | ||||
-rw-r--r-- | tools/lib/h5diff.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 3ba45c3..6a24ab6 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -96,7 +96,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** printf("<-d %s> is not a valid option\n", argv[i+1] ); usage(); } - options->delta = atof(argv[i+1]); + options->delta = (float) atof(argv[i+1]); i++; /* go to next */ } else @@ -114,7 +114,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** printf("<-p %s> is not a valid option\n", argv[i+1] ); usage(); } - options->percent = atof(argv[i+1]); + options->percent = (float) atof(argv[i+1]); i++; /* go to next */ } else diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index c8536b4..7320a63 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -28,9 +28,9 @@ typedef struct { int m_report; /* report mode: print the data */ int m_verbose; /* verbose mode: print the data, list of objcets, warnings */ int d; /* delta, absolute value to compare */ - double delta; /* delta value */ + float delta; /* delta value */ int p; /* relative error to compare*/ - double percent; /* relative error value */ + float percent; /* relative error value */ int n; /* count, compare up to count */ hsize_t count; /* count value */ int err_stat; /* an error ocurred (1, error, 0, no error) */ |