From 3a5502539cc7a02cbc48cd9e9b00a11698930488 Mon Sep 17 00:00:00 2001 From: Sreelakshmi Haridas Maruthur Date: Tue, 1 Oct 2024 10:27:42 -0600 Subject: [PATCH] bruteforce: Fix comparions of unsigned shorts with 0.0f (#2095) Comparing test (of type cl_half) with 0.0f is incorrect because cl_half is a typedef of uint16_t (or unsigned short in c) Co-authored-by: Tejswini Nimburkar --- test_conformance/math_brute_force/binary_two_results_i_half.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_conformance/math_brute_force/binary_two_results_i_half.cpp b/test_conformance/math_brute_force/binary_two_results_i_half.cpp index c5efabe58b..924551c742 100644 --- a/test_conformance/math_brute_force/binary_two_results_i_half.cpp +++ b/test_conformance/math_brute_force/binary_two_results_i_half.cpp @@ -304,7 +304,7 @@ int TestFunc_HalfI_Half_Half(const Func *f, MTdata d, bool relaxedMode) // retry per section 6.5.3.2 if (IsHalfResultSubnormal(correct, half_ulps)) { - fail = fail && !(test == 0.0f && iErr == 0); + fail = fail && !((HTF(test) == 0.0f) && iErr == 0); if (!fail) err = 0.0f; }