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

via libc-commits libc-commits at lists.llvm.org
Wed Sep 24 11:53:54 PDT 2025


================
@@ -0,0 +1,15 @@
+//===-- Single-precision rsqrt function -----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/rsqrtf.h"
+#include "src/__support/math/rsqrtf.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(float, rsqrtf, (float x)) { return math::rsqrtf(x); }
+} // namespace LIBC_NAMESPACE_DECL
----------------
overmighty wrote:

Nit: formatting.

```suggestion
LLVM_LIBC_FUNCTION(float, rsqrtf, (float x)) { return math::rsqrtf(x); }

} // namespace LIBC_NAMESPACE_DECL
```

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


More information about the libc-commits mailing list