[libc-commits] [libc] [libc][math] Implemented sinpif function (PR #97149)
Hendrik Hübner via libc-commits
libc-commits at lists.llvm.org
Sat Jun 29 00:42:29 PDT 2024
================
@@ -38,6 +38,16 @@ LIBC_INLINE int64_t small_range_reduction(double x, double &y) {
return static_cast<int64_t>(kd);
}
+// Return k and y, where
+// k = round(x * 32) and y = (x * 32) - k.
+// => pi * x = (k + y) * pi / 32
+LIBC_INLINE int64_t small_range_reduction_mul_pi(double x, double &y) {
----------------
HendrikHuebner wrote:
If anyone has a better idea for how to name this function I'd love to hear it
https://github.com/llvm/llvm-project/pull/97149
More information about the libc-commits
mailing list