Skip to content

Commit

Permalink
bruteforce: Fix comparions of unsigned shorts with 0.0f (#2095)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lakshmih and Tejswini Nimburkar authored Oct 1, 2024
1 parent 2be73b2 commit 3a55025
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3a55025

Please sign in to comment.