[libc-commits] [libc] [libc][math][c++23] Add {frexp, ilogb, ldexp, llogb, logb}bf16 math functions (PR #154427)
via libc-commits
libc-commits at lists.llvm.org
Sun Aug 24 07:20:24 PDT 2025
================
@@ -354,7 +354,10 @@ LIBC_INLINE cpp::enable_if_t<cpp::is_floating_point_v<T>, T> getpayload(T x) {
return static_cast<T>(payload_dfloat);
} else {
- return static_cast<T>(payload);
+ if constexpr (cpp::is_same_v<T, bfloat16>)
+ return T(static_cast<int>(payload));
----------------
lntue wrote:
we don't have constructor from `uint16_t` (StorageType) to `bfloat16` yet?
https://github.com/llvm/llvm-project/pull/154427
More information about the libc-commits
mailing list