[libc-commits] [libc] [llvm] [libc] Add missing MPFR-based tests for math functions (PR #218281)

via libc-commits libc-commits at lists.llvm.org
Sun Aug 23 20:13:26 PDT 2026


================
@@ -65,8 +65,8 @@ class FloorTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
     EXPECT_FP_EQ(T(-11.0), func(T(-10.65)));
     EXPECT_FP_EQ(T(123.0), func(T(123.38)));
     EXPECT_FP_EQ(T(-124.0), func(T(-123.38)));
-    EXPECT_FP_EQ(T(123.0), func(T(123.96)));
-    EXPECT_FP_EQ(T(-124.0), func(T(-123.96)));
+    EXPECT_FP_EQ(T(123.0), func(T(123.5)));
+    EXPECT_FP_EQ(T(-124.0), func(T(-123.5)));
   }
----------------
tht2005 wrote:

bfloat16 cast 123.96 will be rounded to 124, -123.96 will be rounded to -124. So i change the value so the tests do not fail.

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


More information about the libc-commits mailing list