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 <tnimburk@qti.qualcomm.com>
This commit is contained in:
Sreelakshmi Haridas Maruthur
2024-10-01 10:27:42 -06:00
committed by GitHub
parent 2be73b2be1
commit 3a5502539c

View File

@@ -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;
}