From 12f01d9cd48c8c49b2ad2e5e0d0a0f35e2e598a8 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Tue, 4 Apr 2006 16:54:48 -0500 Subject: [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: --- tools/h5diff/h5diff_common.c | 4 ++-- 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) */ -- cgit v0.12