[libc-commits] [libc] [libc][math][c23] Implemented sinpif function correctly rounded for all rounding modes. (PR #97149)

via libc-commits libc-commits at lists.llvm.org
Sat Jun 29 15:03:31 PDT 2024


================
@@ -439,7 +441,10 @@ class MPFRNumber {
 
   MPFRNumber sinpi() const {
     MPFRNumber result(*this);
-    mpfr_sinpi(result.value, value, mpfr_rounding);
+    MPFRNumber value_pi(0.0, 1280);
----------------
lntue wrote:

you can use predefined macros `MPFR_VERSION_MAJOR` and `MPFR_VERSION_MINOR` to see if `mpfr_sinpi` could be used to speed up the computations

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


More information about the libc-commits mailing list