summaryrefslogtreecommitdiffstats
path: root/test/dt_arith.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-08 14:40:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-08 15:48:21 (GMT)
commitcdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3 (patch)
treed2effdc8a5999cb263ec0d0f607ed36d45fd3160 /test/dt_arith.c
parent29874423bf155e23cfdc1920336c91674865f417 (diff)
downloadhdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.zip
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.gz
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.bz2
Merge changes from develop
Comments and whitespace Skip file-locking and cache changes
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r--test/dt_arith.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 2489539..466554c 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -775,7 +775,7 @@ test_particular_fp_integer(void)
/* Print errors */
if (dst_c != SCHAR_MAX) {
- double x = 0.;
+ double x = 0.0;
signed char y;
if (0 == fails_this_test++)
@@ -819,7 +819,7 @@ test_particular_fp_integer(void)
/* Print errors */
if (dst_i != fill_value) {
- float x = 0.;
+ float x = 0.0;
int y;
if (0 == fails_this_test++)
@@ -2783,18 +2783,18 @@ my_isnan(dtype_t type, void *val)
char s[256];
if (FLT_FLOAT == type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, val, sizeof(float));
retval = (x != x);
}
else if (FLT_DOUBLE == type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, val, sizeof(double));
retval = (x != x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0
}
else if (FLT_LDOUBLE == type) {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, val, sizeof(long double));
retval = (x != x);
#endif
@@ -2809,20 +2809,20 @@ my_isnan(dtype_t type, void *val)
*/
if (!retval) {
if (FLT_FLOAT == type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, val, sizeof(float));
HDsnprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE == type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, val, sizeof(double));
HDsnprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0
}
else if (FLT_LDOUBLE == type) {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, val, sizeof(long double));
HDsnprintf(s, sizeof(s), "%Lg", x);
@@ -3283,7 +3283,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
int check_expo[2];
if (FLT_FLOAT == dst_type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(float));
if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
continue; /* all underflowed, no error */
@@ -3294,7 +3294,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
check_mant[1] = HDfrexpf(hw_f, check_expo + 1);
}
else if (FLT_DOUBLE == dst_type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(double));
if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
continue; /* all underflowed, no error */
@@ -3306,7 +3306,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
#if H5_SIZEOF_LONG_DOUBLE != 0 && (H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE)
}
else {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(long double));
/* dst is largest float, no need to check underflow. */
check_mant[0] = (double)HDfrexpl(x, check_expo + 0);
@@ -3353,18 +3353,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]);
HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
if (FLT_FLOAT == src_type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, &saved[j * src_size], sizeof(float));
HDprintf(" %29.20e\n", (double)x);
}
else if (FLT_DOUBLE == src_type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, &saved[j * src_size], sizeof(double));
HDprintf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, &saved[j * src_size], sizeof(long double));
HDfprintf(stdout, " %29.20Le\n", x);
#endif
@@ -3375,18 +3375,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]);
HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
if (FLT_FLOAT == dst_type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(float));
HDprintf(" %29.20e\n", (double)x);
}
else if (FLT_DOUBLE == dst_type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(double));
HDprintf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(long double));
HDfprintf(stdout, " %29.20Le\n", x);
#endif