[libc-commits] [libc] [libc][math] Improve the performance of sqrtf128. (PR #122578)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Feb 11 11:34:29 PST 2025


================
@@ -7,14 +7,426 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/math/sqrtf128.h"
-#include "src/__support/FPUtil/sqrt.h"
+#include "src/__support/CPP/bit.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/rounding_mode.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/optimization.h"
+#include "src/__support/uint128.h"
+
+// Compute sqrtf128 with correct rounding for all rounding modes using integer
+// arithmetic by Alexei Sibidanov (sibid at uvic.ca):
----------------
nickdesaulniers wrote:

Nice, if there's a link to a whitepaper (or reference code) consider adding it to this comment.

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


More information about the libc-commits mailing list