From 07ddc66d8a3bc312a33797a94a1bbf9b96d9ef5f Mon Sep 17 00:00:00 2001 From: Haonan Yang Date: Wed, 3 Jul 2024 00:36:18 +0800 Subject: [PATCH] Fix typo for log. (#1995) This aligns with unary_float.cpp. --- .../math_brute_force/macro_unary_double.cpp | 10 +++++----- test_conformance/math_brute_force/unary_double.cpp | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test_conformance/math_brute_force/macro_unary_double.cpp b/test_conformance/math_brute_force/macro_unary_double.cpp index 2d75bc5c33..b747b9802f 100644 --- a/test_conformance/math_brute_force/macro_unary_double.cpp +++ b/test_conformance/math_brute_force/macro_unary_double.cpp @@ -241,7 +241,7 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data) if (q[j] > t[j]) err = q[j] - t[j]; vlog_error("\nERROR: %sD: %" PRId64 " ulp error at %.13la: *%" PRId64 " vs. %" PRId64 "\n", - name, err, ((double *)gIn)[j], t[j], q[j]); + name, err, s[j], t[j], q[j]); return -1; } @@ -265,10 +265,10 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data) cl_ulong err = -t[j] - q[j]; if (q[j] > -t[j]) err = q[j] + t[j]; - vlog_error( - "\nERROR: %sD%s: %" PRId64 " ulp error at %.13la: *%" PRId64 - " vs. %" PRId64 "\n", - name, sizeNames[k], err, ((double *)gIn)[j], -t[j], q[j]); + vlog_error("\nERROR: %sD%s: %" PRId64 + " ulp error at %.13la: *%" PRId64 " vs. %" PRId64 + "\n", + name, sizeNames[k], err, s[j], -t[j], q[j]); return -1; } } diff --git a/test_conformance/math_brute_force/unary_double.cpp b/test_conformance/math_brute_force/unary_double.cpp index 5da18f84b0..f3157fdf60 100644 --- a/test_conformance/math_brute_force/unary_double.cpp +++ b/test_conformance/math_brute_force/unary_double.cpp @@ -288,9 +288,8 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data) { vlog_error("\nERROR: %s%s: %f ulp error at %.13la " "(0x%16.16" PRIx64 "): *%.13la vs. %.13la\n", - job->f->name, sizeNames[k], err, - ((cl_double *)gIn)[j], ((cl_ulong *)gIn)[j], - ((cl_double *)gOut_Ref)[j], test); + job->f->name, sizeNames[k], err, s[j], + ((cl_ulong *)s)[j], ((cl_double *)t)[j], test); return -1; } }