Skip to content

Commit 803220d

Browse files
authored
[libc] changed the return cast from static_cast<float16> to fputil::cast<float16> in exp10f16.cpp. (#112889)
switch to fputil::cast to fix rounding with compiler-rt
1 parent 1b49ee7 commit 803220d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/math/generic/exp10f16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ LLVM_LIBC_FUNCTION(float16, exp10f16, (float16 x)) {
124124

125125
// 10^x = 2^((hi + mid) * log2(10)) * 10^lo
126126
auto [exp2_hi_mid, exp10_lo] = exp10_range_reduction(x);
127-
return static_cast<float16>(exp2_hi_mid * exp10_lo);
127+
return fputil::cast<float16>(exp2_hi_mid * exp10_lo);
128128
}
129129

130130
} // namespace LIBC_NAMESPACE_DECL

0 commit comments

Comments
 (0)