[libc-commits] [libc] [llvm] [libc][math][c23] Add rsqrtf() function (PR #159615)

via libc-commits libc-commits at lists.llvm.org
Sat Oct 4 05:07:27 PDT 2025


================
@@ -67,6 +67,7 @@ TEST(LlvmLibcSharedMathTest, AllFloat) {
 
   ASSERT_FP_EQ(float(8 << 5), LIBC_NAMESPACE::shared::ldexpf(8.0f, 5));
   ASSERT_FP_EQ(float(-1 * (8 << 5)), LIBC_NAMESPACE::shared::ldexpf(-8.0f, 5));
+  EXPECT_FP_EQ(0x1p+0f, LIBC_NAMESPACE::shared::rsqrtf(1.0f));
----------------
overmighty wrote:

Oh, I didn't notice the alphabetical order. It just looks kind of weird to me to have 2 test cases for `ldexpf` followed by a test case for `rsqrtf` with no blank line in between because it makes it look like these tests are related somehow. Lines 49-62 don't look weird to me because there's only 1 test case per function. But this is an extreme nitpick.

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


More information about the libc-commits mailing list