Skip to content

Commit 4fd762c

Browse files
authored
[libc] Fix sqrtf128 smoke test for riscv32. (#129094)
1 parent 253d691 commit 4fd762c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/test/src/math/smoke/sqrtf128_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ TEST_F(LlvmLibcSqrtTest, HardToRound) {
129129
// Then from the largest number.
130130
uint64_t k0 = 101904826760412362ULL;
131131
for (uint64_t k = k0; k > k0 - 10000; --k) {
132-
UInt128 k2 = static_cast<UInt128>(k) * static_cast<UInt128>(k);
133-
float128 x = static_cast<float128>(k2);
132+
float128 k_f128 = static_cast<float128>(k);
133+
float128 x = k_f128 * k_f128;
134134
float128 y = static_cast<float128>(k);
135135
EXPECT_FP_EQ_ALL_ROUNDING(y, LIBC_NAMESPACE::sqrtf128(x));
136136
}

0 commit comments

Comments
 (0)