[libc-commits] [libc] [libc][math][c23] Add {ldexp, scalbn, scalbln}f16 C23 math functions (PR #94797)

via libc-commits libc-commits at lists.llvm.org
Fri Jun 7 13:09:37 PDT 2024


================
@@ -31,20 +31,31 @@ class LdExpTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
   const T nan = FPBits::quiet_nan().get_val();
 
   // A normalized mantissa to be used with tests.
-  static constexpr StorageType MANTISSA = NormalFloat::ONE + 0x1234;
+  static constexpr StorageType MANTISSA = NormalFloat::ONE + 0x123;
----------------
overmighty wrote:

`0x1234` is 13 bits, too large for `float16`'s 10-bit fraction.

(Comment moved from https://github.com/llvm/llvm-project/pull/94758.)

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


More information about the libc-commits mailing list