Skip to content

Commit

Permalink
Update GFloat16 pow test case
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Jan 29, 2025
1 parent 5061f87 commit 5c8a741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions autotest/cpp/testfloat16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ TEST(TestFloat16, math)
EXPECT_EQ(pow(GFloat16(x), GFloat16(y)), GFloat16(pow(x, y)));
using std::fabs;
using std::isfinite;
GFloat16 r1 = pow(GFloat16(x), j);
GFloat16 r2 = GFloat16(pow(x, j));
GFloat16 r1, r2;
r1 = pow(GFloat16(x), j);
r2 = GFloat16(pow(x, j));
if (!isfinite(r1))
{
EXPECT_EQ(r1, r2);
Expand Down
2 changes: 1 addition & 1 deletion port/cpl_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,6 @@ template <> struct numeric_limits<cpl::CPLFloat16>
} // namespace std
#endif // !defined(__STDCPP_FLOAT16_T__)

#endif
#endif // #ifdef __cplusplus

#endif // CPL_FLOAT_H_INCLUDED

0 comments on commit 5c8a741

Please sign in to comment.