[libc-commits] [libc] [libc][math][c23] Add {frexp, ilogb, ldexp, llogb, logb, modf}f16 C23 math functions (PR #94758)

via libc-commits libc-commits at lists.llvm.org
Fri Jun 7 07:27:39 PDT 2024


================
@@ -102,7 +103,7 @@ intlogb(U x) {
     return IntLogbConstants<T>::T_MAX;
   }
 
-  DyadicFloat<FPBits<U>::STORAGE_LEN> normal(bits.get_val());
+  DyadicFloat<cpp::max(FPBits<U>::STORAGE_LEN, 32)> normal(bits.get_val());
----------------
overmighty wrote:

`DyadicFloat<Bits>` uses `UInt<Bits>` which requires `Bits` to be either 32 or a multiple of the size of `WordType` which is never `uint16_t`.

https://github.com/llvm/llvm-project/pull/94758


More information about the libc-commits mailing list