[libc-commits] [libc] [libc][math][c23] Add hypotf16 function (PR #131991)
via libc-commits
libc-commits at lists.llvm.org
Fri Mar 28 04:41:21 PDT 2025
================
@@ -51,8 +51,8 @@ LLVM_LIBC_FUNCTION(float16, hypotf16, (float16 x, float16 y)) {
<< FPBits::FRACTION_LEN)))
return x_abs.get_val() + y_abs.get_val();
- float af = fputil::cast<float>(a_bits.get_val());
- float bf = fputil::cast<float>(b_bits.get_val());
+ float af = static_cast<float>(a_bits.get_val());
----------------
lntue wrote:
You can add comments on the top of the function, mentioning that for targets in which the casts between float16 and float have to be fully emulated, `fputil::hypot<float16>` would be faster.
https://github.com/llvm/llvm-project/pull/131991
More information about the libc-commits
mailing list