[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


================
@@ -60,7 +71,7 @@ class LdExpTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
 
   void testOverflow(LdExpFunc func) {
     NormalFloat x(Sign::POS, FPBits::MAX_BIASED_EXPONENT - 10,
-                  NormalFloat::ONE + 0xF00BA);
+                  NormalFloat::ONE + 0xF00);
----------------
overmighty wrote:

`0xF00BA` is 20 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