[libc-commits] [libc] [libc][math][c23] Improve rsqrtf16() function (PR #160639)

Anton Shepelev via libc-commits libc-commits at lists.llvm.org
Fri Mar 13 21:12:57 PDT 2026


================
@@ -76,6 +76,76 @@ LIBC_INLINE static constexpr float16 rsqrtf16(float16 x) {
   }
 
   return fputil::cast<float16>(result);
+
+#else
+  float xf = fputil::cast<float>(x);
+
+  int exponent = 0;
+  float mantissa = fputil::frexp(xf, exponent);
----------------
amemov wrote:

Thanks, @lntue ! Will keep this in mind. Was hoping to finish it sooner, but got pretty buys with work for the last 3 weeks 🥲  Hopefully, will have it ready closer to the next Math meeting 

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


More information about the libc-commits mailing list