summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5private.h17
-rw-r--r--src/H5timer.c2
2 files changed, 10 insertions, 9 deletions
diff --git a/src/H5private.h b/src/H5private.h
index fa5a114..e0ed6ef 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -538,20 +538,21 @@
* It's the developer's responsibility not to pass in the value 0, which
* may cause the equation to fail.
*/
-#define H5_FLT_ABS_EQUAL(X,Y) (HDfabsf(X-Y) < FLT_EPSILON)
-#define H5_DBL_ABS_EQUAL(X,Y) (HDfabs (X-Y) < DBL_EPSILON)
-#define H5_LDBL_ABS_EQUAL(X,Y) (HDfabsl(X-Y) < LDBL_EPSILON)
+#define H5_FLT_ABS_EQUAL(X,Y) (HDfabsf((X)-(Y)) < FLT_EPSILON)
+#define H5_DBL_ABS_EQUAL(X,Y) (HDfabs ((X)-(Y)) < DBL_EPSILON)
+#define H5_LDBL_ABS_EQUAL(X,Y) (HDfabsl((X)-(Y)) < LDBL_EPSILON)
-#define H5_FLT_REL_EQUAL(X,Y,M) (HDfabsf((Y-X) / X) < M)
-#define H5_DBL_REL_EQUAL(X,Y,M) (HDfabs ((Y-X) / X) < M)
-#define H5_LDBL_REL_EQUAL(X,Y,M) (HDfabsl((Y-X) / X) < M)
+#define H5_FLT_REL_EQUAL(X,Y,M) (HDfabsf(((Y)-(X)) / (X)) < (M))
+#define H5_DBL_REL_EQUAL(X,Y,M) (HDfabs (((Y)-(X)) / (X)) < (M))
+#define H5_LDBL_REL_EQUAL(X,Y,M) (HDfabsl(((Y)-(X)) / (X)) < (M))
-/* KiB, MiB, GiB, TiB, EiB - Used in profiling and timing code */
+/* KiB, MiB, GiB, TiB, PiB, EiB - Used in profiling and timing code */
#define H5_KB (1024.0F)
#define H5_MB (1024.0F * 1024.0F)
#define H5_GB (1024.0F * 1024.0F * 1024.0F)
#define H5_TB (1024.0F * 1024.0F * 1024.0F * 1024.0F)
-#define H5_EB (1024.0F * 1024.0F * 1024.0F * 1024.0F * 1024.0F)
+#define H5_PB (1024.0F * 1024.0F * 1024.0F * 1024.0F * 1024.0F)
+#define H5_EB (1024.0F * 1024.0F * 1024.0F * 1024.0F * 1024.0F * 1024.0F)
#ifndef H5_HAVE_FLOCK
/* flock() operations. Used in the source so we have to define them when
diff --git a/src/H5timer.c b/src/H5timer.c
index 94f2883..d9be6bb 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -228,7 +228,7 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
} else if(bw < H5_TB) {
sprintf(buf, "%05.4f", bw / H5_GB);
HDstrcpy(buf+5, " GB/s");
- } else if(bw < H5_EB) {
+ } else if(bw < H5_PB) {
sprintf(buf, "%05.4f", bw / H5_TB);
HDstrcpy(buf+5, " TB/s");
} else {