diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-14 17:54:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 17:54:00 (GMT) |
commit | aa849f07e323e4654ac22dbcd2221d9c8d357486 (patch) | |
tree | f7a9f4ec99cbd92ea8d7fb2f57e1838cc71bdd7f /tools | |
parent | ffa4bdac0a686aa00705b72132c5e8948cfee9db (diff) | |
download | hdf5-aa849f07e323e4654ac22dbcd2221d9c8d357486.zip hdf5-aa849f07e323e4654ac22dbcd2221d9c8d357486.tar.gz hdf5-aa849f07e323e4654ac22dbcd2221d9c8d357486.tar.bz2 |
Remove HD prefix from math functions (#3538)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff_array.c | 48 | ||||
-rw-r--r-- | tools/test/h5diff/h5diffgentest.c | 36 |
2 files changed, 42 insertions, 42 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index c0430bc..dd76983 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1688,8 +1688,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_float); - isnan2 = HDisnan(temp2_float); + isnan1 = isnan(temp1_float); + isnan2 = isnan(temp2_float); } /* both not NaN, do the comparison */ @@ -1725,8 +1725,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_float); - isnan2 = HDisnan(temp2_float); + isnan1 = isnan(temp1_float); + isnan2 = isnan(temp2_float); } /* both not NaN, do the comparison */ if ((!isnan1 && !isnan2)) { @@ -1773,8 +1773,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_float); - isnan2 = HDisnan(temp2_float); + isnan1 = isnan(temp1_float); + isnan2 = isnan(temp2_float); } /* both not NaN, do the comparison */ @@ -1866,8 +1866,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_double); - isnan2 = HDisnan(temp2_double); + isnan1 = isnan(temp1_double); + isnan2 = isnan(temp2_double); } /* both not NaN, do the comparison */ @@ -1902,8 +1902,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_double); - isnan2 = HDisnan(temp2_double); + isnan1 = isnan(temp1_double); + isnan2 = isnan(temp2_double); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { @@ -1948,8 +1948,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_double); - isnan2 = HDisnan(temp2_double); + isnan1 = isnan(temp1_double); + isnan2 = isnan(temp2_double); } /* both not NaN, do the comparison */ @@ -2041,8 +2041,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_double); - isnan2 = HDisnan(temp2_double); + isnan1 = isnan(temp1_double); + isnan2 = isnan(temp2_double); } /* both not NaN, do the comparison */ @@ -2076,8 +2076,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_double); - isnan2 = HDisnan(temp2_double); + isnan1 = isnan(temp1_double); + isnan2 = isnan(temp2_double); } /* both not NaN, do the comparison */ @@ -2123,8 +2123,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, *------------------------------------------------------------------------- */ if (opts->do_nans) { - isnan1 = HDisnan(temp1_double); - isnan2 = HDisnan(temp2_double); + isnan1 = isnan(temp1_double); + isnan2 = isnan(temp2_double); } /* both not NaN, do the comparison */ @@ -3140,8 +3140,8 @@ equal_double(double value, double expected, diff_opt_t *opts) * detect NaNs *------------------------------------------------------------------------- */ - bool isnan1 = HDisnan(value); - bool isnan2 = HDisnan(expected); + bool isnan1 = isnan(value); + bool isnan2 = isnan(expected); /*------------------------------------------------------------------------- * we consider NaN == NaN to be true @@ -3187,8 +3187,8 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts) * detect NaNs *------------------------------------------------------------------------- */ - bool isnan1 = HDisnan(value); - bool isnan2 = HDisnan(expected); + bool isnan1 = isnan(value); + bool isnan2 = isnan(expected); /*------------------------------------------------------------------------- * we consider NaN == NaN to be true @@ -3233,8 +3233,8 @@ equal_float(float value, float expected, diff_opt_t *opts) * detect NaNs *------------------------------------------------------------------------- */ - bool isnan1 = HDisnan(value); - bool isnan2 = HDisnan(expected); + bool isnan1 = isnan(value); + bool isnan2 = isnan(expected); /*------------------------------------------------------------------------- * we consider NaN == NaN to be true diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index 37c2cc3..06bd2a9 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -1139,15 +1139,15 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) float data15[6]; float data16[6]; - data15[0] = (float)HDsqrt(-1.0); + data15[0] = (float)sqrt(-1.0); data15[1] = 1.0; - data15[2] = (float)HDsqrt(-1.0); + data15[2] = (float)sqrt(-1.0); data15[3] = 1.0; data15[4] = 1.0; data15[5] = 1.0; - data16[0] = (float)HDsqrt(-1.0); - data16[1] = (float)HDsqrt(-1.0); + data16[0] = (float)sqrt(-1.0); + data16[1] = (float)sqrt(-1.0); data16[2] = 1.0; data16[3] = 1.0; data16[4] = 1.0; @@ -1166,15 +1166,15 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) double data17[6]; double data18[6]; - data17[0] = HDsqrt(-1.0); + data17[0] = sqrt(-1.0); data17[1] = 1.0; - data17[2] = HDsqrt(-1.0); + data17[2] = sqrt(-1.0); data17[3] = 1.0; data17[4] = 1.0; data17[5] = 1.0; - data18[0] = HDsqrt(-1.0); - data18[1] = HDsqrt(-10000.0); + data18[0] = sqrt(-1.0); + data18[1] = sqrt(-10000.0); data18[2] = 1.0; data18[3] = 1.0; data18[4] = 1.0; @@ -1193,11 +1193,11 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) float data19[6]; double data20[6]; - data19[0] = data19[1] = data19[2] = (float)HDlog(0.0); - data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0); + data19[0] = data19[1] = data19[2] = (float)log(0.0); + data19[3] = data19[4] = data19[5] = (float)-log(0.0); - data20[0] = data20[1] = data20[2] = HDlog(0.0); - data20[3] = data20[4] = data20[5] = -HDlog(0.0); + data20[0] = data20[1] = data20[2] = log(0.0); + data20[3] = data20[4] = data20[5] = -log(0.0); write_dset(gid1, 1, dims1, "fp19", H5T_NATIVE_FLOAT, data19); write_dset(gid1, 1, dims1, "fp19_COPY", H5T_NATIVE_FLOAT, data19); @@ -1221,13 +1221,13 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) size_t type_size; hid_t tid; - buf1[0].d = HDsqrt(-1.0); - buf1[0].f = (float)HDsqrt(-1.0); - buf2[0].d = HDsqrt(-1.0); - buf2[0].f = (float)HDsqrt(-1.0); + buf1[0].d = sqrt(-1.0); + buf1[0].f = (float)sqrt(-1.0); + buf2[0].d = sqrt(-1.0); + buf2[0].f = (float)sqrt(-1.0); - buf1[1].d = HDsqrt(-1.0); - buf1[1].f = (float)HDsqrt(-1.0); + buf1[1].d = sqrt(-1.0); + buf1[1].f = (float)sqrt(-1.0); buf2[1].d = 0.0; buf2[1].f = 0.0; |